Hello all,
I was looking to wrap hasattr in a numpy ufunc and got some weird behavior.
Here is a transcript:
In [5]: import numpy as np
In [6]: np.__version__
Out[6]: '1.6.2'
In [7]: b = [1,2,3]
In [7]: nphas = np.frompyfunc(hasattr, 2, 1)
In [8]: hasattr(b, 'extend')
Out[8]: True
In [9]: nphas(b
This is the stack overflow discussion mentioned.
http://stackoverflow.com/questions/9164269/can-you-tell-if-an-array-is-a-view-of-another
I basically implemented the answer from SO. I feel like the "is" gives you a
good handle on things since to be true they are actually the same location in
m
Stack overflow post related to this:
http://stackoverflow.com/questions/9164269/can-you-tell-if-an-array-is-a-view-of-another
On Feb 28, 2012, at 4:01 PM, Kurt Smith wrote:
For an arbitrary numpy array 'a', what does 'a.flags.owndata' indicate?
I originally thought that owndata is False iff '
Hello all,
the docs are unclear as to the reference counting on the inputs to the numpy C
function PyArray_FromAny().
multiarraymodule.c in the PyArray_InnerProduct() code seems to imply that a
reference to dtype is stolen in the PyArray_FromAny process. Meaning that I
don't need/can't have a