Martinot-Lagarde
wrote:
> Le 18/07/2014 20:42, Charles G. Waldman a écrit :
>> Well, if the goal is "shorthand", typing numpy.array(numpy.mat())
>> won't please many users.
>>
>> But the more I think about it, the less I think Numpy should support
>>
Well, if the goal is "shorthand", typing numpy.array(numpy.mat())
won't please many users.
But the more I think about it, the less I think Numpy should support
this (non-Pythonic) input mode. Too much molly-coddling of new users!
When doing interactive work I usually just type:
>>> np.array([[1,
I greatly prefer "np.mat" to "np.arr" for this, FWIW
On Fri, Jul 18, 2014 at 3:37 AM, Nathaniel Smith wrote:
> On Thu, Jul 17, 2014 at 11:10 PM, Charles G. Waldman
> wrote:
>>
>> -1 on the 'arr' name. I think if we're going to support t
-1 on the 'arr' name. I think if we're going to support this function at
all (which I'm not convinced is a good idea), it should be np.fromsomething
like the other from* functions.
Maybe frommatlab?
I think that 'arr' is just too generic and too close to 'array'.
On Tue, Jul 15, 2014 at 3:5
test case:
#!/usr/bin/env python
import numpy as np
a=np.array(['2014', '2015', '2016'], dtype='datetime64')
x=np.datetime64('2015')
print a>x
np.save('test.npy', a)
b = np.load('test.npy', mmap_mode='c')
print b>x
result:
>>> [False False True]
Traceback (most recent call last):
File "", li
>>> d = numpy.dtype(int)
>>> if d: print "OK"
... else: print "I'm surprised"
I'm surprised
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hi Numpy folks.
I just noticed that comparing an array of type 'object' to None does
not behave as I expected. Is this a feature or a bug? (I can take a
stab at fixing it if it's a bug, as I believe it is).
>>> np.version.full_version
'1.8.0'
>>> a = np.array(['Frank', None, 'Nancy'])
>>> a
a
>>> this might work:
>>>
>>> CC="gcc -m32" LDSHARED="gcc -m32" FF="gfortran -m32" linux32 python
>>> setup.py build
Compiler flags can't be added to CC, they should be in CFLAGS. (and
ld flags go into LDFLAGS). Otherwise you are saying to use a program
called "gcc -m32" (with a space in the name
If you convert an array of strings to datetime64s and 'NaT' (or one of
its variants) appears in the string, all subsequent values are
rendered as NaT:
(this is in 1.7.1 but the problem is present in current dev version as well)
>>> import numpy as np
>>> a = np.array(['2010', 'nat', '2030'])
>>>