In linux and win32 (numpy 1.0.1 release compiled from source, and
1.0.3dev3726 respectively), I get the following normal behaviour:
>>> import numpy as np
>>> np.array([1.0, 2.0, 3.0, 4.0])
array([ 1., 2., 3., 4.])
>>> np.int32(np.array([1.0, 2.0, 3.0, 4.0]))
array([ 1, 2, 3, 4])
But on thr
David Cournapeau wrote:
> Robert Kern wrote:
>> David Cournapeau wrote:
>>> Hi,
>>>
>>> I wanted to know if the following behaviour is a bug or intended
>>> behaviour:
>>>
>>> """
>>> import numpy as N
>>> N.allclose(N.array([[1., 1.]]), N.array([1.]))
>>> """
>>>
>>> eg should allclose retu
Robert Kern wrote:
> David Cournapeau wrote:
>> Hi,
>>
>> I wanted to know if the following behaviour is a bug or intended
>> behaviour:
>>
>> """
>> import numpy as N
>> N.allclose(N.array([[1., 1.]]), N.array([1.]))
>> """
>>
>> eg should allclose return True if arrays have different shape
Great, thanks Tim!
Martin
Timothy Hochberg wrote:
>
> Using np.equals instead of == seems to work:
>
> >>> i = np.array([0,1,2,None,3,4,None])
> >>> i
> array([0, 1, 2, None, 3, 4, None], dtype=object)
> >>> np.where(i == None)
> ()
> >>> i == None
> False
> >>> np.where(np.equal(i, None))
On 5/7/07, Martin Spacek <[EMAIL PROTECTED]> wrote:
I want to find the indices of all the None objects in an object array:
>> import numpy as np
>> i = np.array([0, 1, 2, None, 3, 4, None])
>> np.where(i == None)
()
Using == doesn't work the same way on object arrays as it does on, say,
an arr
I want to find the indices of all the None objects in an object array:
>> import numpy as np
>> i = np.array([0, 1, 2, None, 3, 4, None])
>> np.where(i == None)
()
Using == doesn't work the same way on object arrays as it does on, say,
an array of int32. Any suggestions? Do I have to use a lo
David Cournapeau wrote:
> Hi,
>
> I wanted to know if the following behaviour is a bug or intended
> behaviour:
>
> """
> import numpy as N
> N.allclose(N.array([[1., 1.]]), N.array([1.]))
> """
>
> eg should allclose return True if arrays have different shape ?
If they are broadcastable
Bill Baxter wrote:
> Of course even better would be if ipython were in a GUI, and
> docstrings could just be proactively prefectched and displayed in
> another pane while I type, or argument lists could be popped up like
> in PyCrust.
I think someone was working on iPython-PyCrust integration at s
Hi,
I wanted to know if the following behaviour is a bug or intended
behaviour:
"""
import numpy as N
N.allclose(N.array([[1., 1.]]), N.array([1.]))
"""
eg should allclose return True if arrays have different shape ?
cheers,
David
___
On 5/7/07, dmitrey <[EMAIL PROTECTED]> wrote:
> hi all,
> I have some troubles with Python2.5+matplotlib, so now I'm using
> Python2.4.3. I failed to compile both numpy1.0.1 and 1.0.2
> (Mandrake2007) so currently I'm using 1.0b.
> Howto check if numpy.array instances x and y are equal? (i.e. all
>
hi all,
I have some troubles with Python2.5+matplotlib, so now I'm using
Python2.4.3. I failed to compile both numpy1.0.1 and 1.0.2
(Mandrake2007) so currently I'm using 1.0b.
Howto check if numpy.array instances x and y are equal? (i.e. all
elements are same)
Please answer one more question -
11 matches
Mail list logo