Hi Jaidev,
On Wed, Dec 28, 2011 at 12:09:45PM +0530, Jaidev Deshpande wrote:
> Eg. x is a NumPy array, and I need its transpose
> Should I use
> >>> x.T
> or
> >>> numpy.transpose(T) ?
If you are wondering for a timing reason, use IPython's '%timeit' magic
to figure out if it does make a di
Hi
It is said that function calls are expensive. Does that mean one must
use available methods instead?
Eg. x is a NumPy array, and I need its transpose
Should I use
>>> x.T
or
>>> numpy.transpose(T) ?
Does it matter which one I'm using ? If not, under what conditions
does it become import
sorry to be a proselytizer, but this would be trivial with Cython:
http://cython.org/
-Chris
On Tue, Dec 27, 2011 at 1:52 AM, Åke Kullenberg
wrote:
> After diving deeper in the docs I found the PyTuple_New alternative to
> building tuples instead of Py_BuildValue. It seems to work fine.
>
> Bu
I suspect your getting a bit tangled up in the multiple binaries of
Python on the Mac.
On the python.org site there are two binaries:
32bit, PPC_Intel, OS-X 10.3.9 and above.
32 and 64 bit, Intel only, OS-X 10.6 and above.
You need to make sure that you get a matplotlib build for the python
bui
On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner
wrote:
> Hi all,
>
> Two questions:
>
> - Are dtypes supposed to be comparable (i.e. implement '==', '!=')?
Yes.
> - Are dtypes supposed to be hashable?
Yes, with caveats. Strictly speaking, we violate the condition that
objects that equal each o
After diving deeper in the docs I found the PyTuple_New alternative to
building tuples instead of Py_BuildValue. It seems to work fine.
But I am unsure of the INCREF/DECREF refcounting thing. Will I need any of
those in the code below?
Also, for generic c extensions, how can I check the refcounts
I have put together a few c extensions following the documentation on
http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays. There is however
one thing that stumps me.
To illustrate with a simple code snippet, the test function below
multiplies the input numpy double array by two. So far so good