Sebastian Haase wrote:
> Is N.extract() the equivalent of numarray.compress() ?
Only for the specific flattening behavior that you are talking about. However,
numpy.extract() does not have the axis= argument that numarray.compress() does.
--
Robert Kern
"I have come to believe that the whole
Sebastian Haase wrote:
> Hi!
> when calling compress
> I get this error message after moving to numpy:
>
> ValueError: 'condition must be 1-d array'
>
> Is the reason for this the change of the default axis from
> axis=0
> to
> axis=None
Not really, it's just that N-d arrays don't make much sens
On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> Hi!
> when calling compress
> I get this error message after moving to numpy:
>
> ValueError: 'condition must be 1-d array'
>
> Is the reason for this the change of the default axis from
> axis=0
> to
> axis=None
>
> What does axis=None mean i
Hi!
when calling compress
I get this error message after moving to numpy:
ValueError: 'condition must be 1-d array'
Is the reason for this the change of the default axis from
axis=0
to
axis=None
What does axis=None mean in this case !?
Thanks,
-Sebastian
Christopher Barker wrote:
> eople like:
>
> wxPython -- Robin Dunn
> PIL -- Fredrik Lundh
> PyOpenGL -- Who?
> PyObjC -- would it be useful there? (Ronald Oussoren)
> MatplotLib (but maybe it's already married to numpy...)
> PyGtk ?
>
It's a good start, but their is also
PyMedia, PyVoxel,
On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> >>> N.__version__
> '1.0.2.dev3487'
>
> in any case: inside the script it somehow generated a nan --- is
> there a bug in numpy !?
No bug here ! see below !
> I remember that there was some discussion about resize !?
> What should I add
Hi!
I'm continuing my code conversion to numpy.
Trying to track down a segmentation fault I found
1) ndimage crashed because I was feeding (nan,nan) as shift value .
2) but where did I get the nan from ? I just found that there is code
like this: (*paraphrased*)
size = N.array( [255] )
size
Travis Oliphant wrote:
> Guido is the one who
> encouraged me at SciPy 2006 to push this and so I think he is generally
> favorable to the idea.
good sign.
> The Python devs will definitely push back. The
> strongest opposition seems to be from people that don't 'get' it and so
> don't want
On 1/4/07, Christopher Barker <[EMAIL PROTECTED]> wrote:
> And if you're an idiot like me that for some unknown reason still does
> not use ipython, you can always do:
>
> for i in dir(N):
> if "nan" in i: print i
I'm always impressed by those who take the stairs instead of the elevator.
Fernando Perez wrote:
> It's probably worth mentioning that IPython has (thanks to a user
> contributed implementation) search capabilities besides tab completion
very handy.
And if you're an idiot like me that for some unknown reason still does
not use ipython, you can always do:
for i in d
On 1/4/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> Sebastian Haase wrote:
> > Hi!
> >
> > Simple question:
> > How do I test if an array contains NaN ?
> > Or others like inf ...?
>
> In [1633]: isinf?
> Type: ufunc
> Base Class:
> Namespace: Interactive
> Docstring:
> y =
On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> On 1/4/07, Keith Goodman <[EMAIL PROTECTED]> wrote:
> > On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> > > How do I test if an array contains NaN ?
> > > Or others like inf ...?
> >
> > isnan()
> > ~isfinite()
> > any()
>
> Aah ! than
Sebastian Haase wrote:
> Hi!
>
> Simple question:
> How do I test if an array contains NaN ?
> Or others like inf ...?
In [1633]: isinf?
Type: ufunc
Base Class:
Namespace: Interactive
Docstring:
y = isinf(x) returns True where x is +inf or -inf
In [1634]: isnan?
Type:
On 1/4/07, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> > How do I test if an array contains NaN ?
> > Or others like inf ...?
>
> isnan()
> ~isfinite()
> any()
Aah ! thanks,
you mean I have to create an intermediate array that tells me for
eve
>> PyArrayView_FromObject(obj)
>>
>
> yes, that's what I'm looking for -- please do add that to the C-API
>
>
>>> By the way,, how compatible is this with the existing buffer protocol?
>>>
>>>
>> It's basically orthogonal. In other-words, if you defined the array
>> view protoc
On 1/4/07, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> How do I test if an array contains NaN ?
> Or others like inf ...?
isnan()
~isfinite()
any()
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/n
Colin J. Williams wrote:
> Travis Oliphant wrote:
>
>> I'm attaching my latest extended buffer-protocol PEP that is trying to
>> get the array interface into Python. Basically, it is a translation of
>> the numpy header files into something as simple as possible that can
>> still be used to
Hi!
Simple question:
How do I test if an array contains NaN ?
Or others like inf ...?
Thanks,
Sebastian Haase
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Travis Oliphant wrote:
>> bf_getarrayview (obj)
>>
> Yes you could call this (but you would call it from the type object like
> this
>
> obj->ob_type->tp_as_buffer->bf_getarrayview(obj)
>
> Or more likely (and I should add this to the C-API) you would call.
>
> PyArrayView_FromObject(obj)
y
Travis Oliphant wrote:
>
> I'm attaching my latest extended buffer-protocol PEP that is trying to
> get the array interface into Python. Basically, it is a translation of
> the numpy header files into something as simple as possible that can
> still be used to describe a complicated block of m
Here is a new update. I added the PY_POINTER, and PY_ARRAYOF
specifications to simplify the extended specification and allow memory
that is a pointer to another memory.
This should be the last update today.
-Travis
PEP:
Title: Extending the buffer protocol to include the array interface
V
Christopher Barker wrote:
> Travis,
>
> First, thanks for doing this -- Python really needs it!
> > While this approach
>
>> works, it requires attribute lookups which can be expensive when
>> sharing many small arrays.
>>
>
> Ah, I do like reducing that overhead -- I know I use
Travis,
First, thanks for doing this -- Python really needs it!
> While this approach
> works, it requires attribute lookups which can be expensive when
> sharing many small arrays.
Ah, I do like reducing that overhead -- I know I use arrays a lot for
small data sets too, so that ove
I'm attaching my latest extended buffer-protocol PEP that is trying to
get the array interface into Python. Basically, it is a translation of
the numpy header files into something as simple as possible that can
still be used to describe a complicated block of memory to another user.
My purpos
I'm attaching my latest extended buffer-protocol PEP that is trying to
get the array interface into Python. Basically, it is a translation of
the numpy header files into something as simple as possible that can
still be used to describe a complicated block of memory to another user.
My purp
> > However, even record
> > arrays don't have a keys() method.
You can access the attributes of a recarray by
N.ndarray.__getattribute__(obj,'dtype').fields
which is yet another dictproxy.
> Some context: the type of introspection I'm often wishing I could do
> in a single, easy command usually
Vincent,
Thanks again.
On Jan 4, 2007, at 11:40 AM, Vincent Nijs wrote:
> --b,
>
> The only data type in python that has a keys() method is a dictionary.
Doh!
> Unless it is a record array (http://www.scipy.org/RecordArrays)
> there is no
> information on variable names contained in the obje
On Thursday 04 January 2007 14:18, belinda thom wrote:
> Hello,
>
> I wrote a "display obj" method for viewing instance data:
...
> and I'm wondering why it doesn't work on ndarrays:
An (instance of) ndarray doesn't have a __dict__ attribute, as you've
noticed.
The class ndarray does have one.
belinda thom wrote:
> Hello,
>
> I wrote a "display obj" method for viewing instance data:
>
> def dobj(obj) :
> """extended object viewer that displays arg"""
> print 'Class: ', obj.__class__.__name__, ' id:', id(obj)
> for k in obj.__dict__.keys() :
> print ' ', k, ': '
--b,
The only data type in python that has a keys() method is a dictionary.
Unless it is a record array (http://www.scipy.org/RecordArrays) there is no
information on variable names contained in the object. However, even record
arrays don't have a keys() method.
Vincent
On 1/4/07 1:18 PM, "b
Hello,
I wrote a "display obj" method for viewing instance data:
def dobj(obj) :
"""extended object viewer that displays arg"""
print 'Class: ', obj.__class__.__name__, ' id:', id(obj)
for k in obj.__dict__.keys() :
print ' ', k, ': ', obj.__dict__[k], ' id:', id(obj.__di
On Thu, 4 Jan 2007 10:42:35 -0700
"Charles R Harris" <[EMAIL PROTECTED]> wrote:
> On 1/4/07, Nils Wagner <[EMAIL PROTECTED]>
>wrote:
>>
>> On Wed, 3 Jan 2007 22:37:39 -0700
>> "Charles R Harris" <[EMAIL PROTECTED]> wrote:
>> > On 1/3/07, Nils Wagner <[EMAIL PROTECTED]>
>> >wrote:
>
>
>
>
>
On 1/4/07, Nils Wagner <[EMAIL PROTECTED]> wrote:
On Wed, 3 Jan 2007 22:37:39 -0700
"Charles R Harris" <[EMAIL PROTECTED]> wrote:
> On 1/3/07, Nils Wagner <[EMAIL PROTECTED]>
>wrote:
I guess the problem is due to
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux
On Thu, 4 Jan 2007 11:50:37 +0100
Christian Meesters <[EMAIL PROTECTED]> wrote:
> Hoi Nils,
>
> I'm still with 10.0 on my machine, but perhaps this
>helps:
> I followed exactely the instructions given here:
> http://pong.tamu.edu/tiki/tiki-view_blog_post.php?blogId=6&postId=97
> and also sticke
Hoi Nils,
I'm still with 10.0 on my machine, but perhaps this helps:
I followed exactely the instructions given here:
http://pong.tamu.edu/tiki/tiki-view_blog_post.php?blogId=6&postId=97
and also sticked exactly to the recommended compiler flags given here:
http://www.scipy.org/Installing_SciPy/Bu
On Wed, 3 Jan 2007 22:37:39 -0700
"Charles R Harris" <[EMAIL PROTECTED]> wrote:
> On 1/3/07, Nils Wagner <[EMAIL PROTECTED]>
>wrote:
>>
>> Hi all,
>>
>> I have tried to build the latest numpy on a 64-bit
>>machine
>> using OpenSuSE10.2.
>> I have build BLAS, LAPACK and ATLAS from scratch (g77).
36 matches
Mail list logo