Re: [Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread josef . pktd
On Wed, Aug 24, 2011 at 8:43 PM, Anthony Scopatz wrote: > > > On Wed, Aug 24, 2011 at 7:34 PM, srean wrote: >> >> Thanks Anthony and Mark, this is good to know. >> >> So what would be the advised way of looking at freshly baked documentation >> ? Just look at the raw files ? or is there some plac

Re: [Numpy-discussion] memoryview shape/strides representation for ndim = 0

2011-08-24 Thread Travis Oliphant
On Aug 22, 2011, at 7:35 AM, Mark Dickinson wrote: > On Mon, Aug 22, 2011 at 1:30 PM, Stefan Krah > wrote: >> Numpy arrays and memoryview currently have different representations >> for shape and strides if ndim = 0: >> > from numpy import * > x = array(9, int32) > x.ndim >> 0

Re: [Numpy-discussion] Decimal arrays?

2011-08-24 Thread Travis Oliphant
On Aug 22, 2011, at 3:51 PM, Robert Kern wrote: > On Mon, Aug 22, 2011 at 10:07, Chris Withers wrote: >> On 22/08/2011 00:18, Mark Dickinson wrote: >>> On Sun, Aug 21, 2011 at 1:08 AM, Robert Kern wrote: You may want to try the cdecimal package: http://pypi.python.org/pypi/cde

Re: [Numpy-discussion] NA masks for NumPy are ready to test

2011-08-24 Thread Mark Wiebe
On Wed, Aug 24, 2011 at 6:09 PM, Wes McKinney wrote: > > - Performance with skipna is a bit disappointing: > > In [52]: arr = np.random.randn(1e6) > In [54]: arr.flags.maskna = True > In [56]: arr[::2] = np.NA > In [58]: timeit arr.sum(skipna=True) > 100 loops, best of 3: 7.31 ms per loop > > th

Re: [Numpy-discussion] NA masks for NumPy are ready to test

2011-08-24 Thread Mark Wiebe
On Wed, Aug 24, 2011 at 6:09 PM, Wes McKinney wrote: > On Wed, Aug 24, 2011 at 8:19 PM, Mark Wiebe wrote: > > On Fri, Aug 19, 2011 at 11:37 AM, Bruce Southey > wrote: > >> > >> Hi, > >> > >> > >> 2) Can the 'skipna' flag be added to the methods? > >> >>> a.sum(skipna=True) > >> Traceback (most

Re: [Numpy-discussion] NA masks for NumPy are ready to test

2011-08-24 Thread Wes McKinney
On Wed, Aug 24, 2011 at 8:19 PM, Mark Wiebe wrote: > On Fri, Aug 19, 2011 at 11:37 AM, Bruce Southey wrote: >> >> Hi, >> >> >> 2) Can the 'skipna' flag be added to the methods? >> >>> a.sum(skipna=True) >> Traceback (most recent call last): >>  File "", line 1, in >> TypeError: 'skipna' is an i

Re: [Numpy-discussion] ImportError: dynamic module does not define init function (initmultiarray)

2011-08-24 Thread dpo
dpo wrote: > > --- > Traceback (most recent call last): > File "/Users/dpo/.virtualenvs/matrox/matrox/curve.py", line 3, in > > import numpy as np > File > "/Users/dpo/.virtualenvs/matrox/lib/python2.7/site-packages/numpy/__init__.py", > line 137, in > import add_newdocs > File >

Re: [Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread Anthony Scopatz
On Wed, Aug 24, 2011 at 7:34 PM, srean wrote: > Thanks Anthony and Mark, this is good to know. > > So what would be the advised way of looking at freshly baked documentation > ? Just look at the raw files ? or is there some place else where the correct > sphinx rendered docs are hosted. > Buildi

Re: [Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread srean
Thanks Anthony and Mark, this is good to know. So what would be the advised way of looking at freshly baked documentation ? Just look at the raw files ? or is there some place else where the correct sphinx rendered docs are hosted. On Wed, Aug 24, 2011 at 7:19 PM, Anthony Scopatz wrote: > code-

Re: [Numpy-discussion] NA masks for NumPy are ready to test

2011-08-24 Thread Mark Wiebe
On Fri, Aug 19, 2011 at 11:37 AM, Bruce Southey wrote: > Hi, > > > 2) Can the 'skipna' flag be added to the methods? > >>> a.sum(skipna=True) > Traceback (most recent call last): > File "", line 1, in > TypeError: 'skipna' is an invalid keyword argument for this function > >>> np.sum(a,skipna

Re: [Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread Anthony Scopatz
code-block:: is a directive that I think might be specific to sphinx. Naturally, github's renderer will drop it. On Wed, Aug 24, 2011 at 7:10 PM, Mark Wiebe wrote: > On Wed, Aug 24, 2011 at 5:05 PM, srean wrote: > >> Following up on my own question: I can see the code in the commit. So it >> a

Re: [Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread Mark Wiebe
On Wed, Aug 24, 2011 at 5:05 PM, srean wrote: > Following up on my own question: I can see the code in the commit. So it > appears that > > code-block:: > > Are not being rendered correctly. Could anyone confirm ? In case it is my > browser alone, though I did try after disabling no-script. I b

[Numpy-discussion] NA mask C-API documentation

2011-08-24 Thread Mark Wiebe
I've added C-API documentation to the missingdata branch. The .rst file (beware of the github rst parser though, it drops some of the content) is here: https://github.com/m-paradox/numpy/blob/missingdata/doc/source/reference/c-api.maskna.rst and I made a small example module which goes with it he

Re: [Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread srean
Following up on my own question: I can see the code in the commit. So it appears that code-block:: Are not being rendered correctly. Could anyone confirm ? In case it is my browser alone, though I did try after disabling no-script. On Wed, Aug 24, 2011 at 6:53 PM, srean wrote: > Hi, > > I was

[Numpy-discussion] c-info.ufunc-tutorial.rst

2011-08-24 Thread srean
Hi, I was reading this document, https://github.com/numpy/numpy/blob/master/doc/source/user/c-info.ufunc-tutorial.rst its well written and there is a good build up to exciting code examples that are coming, but I do not see the actual examples, only how they may be used. Is it located somewhere e

Re: [Numpy-discussion] saving groups of numpy arrays to disk

2011-08-24 Thread Anthony Scopatz
On Sun, Aug 21, 2011 at 7:24 AM, Pauli Virtanen wrote: > On Sat, 20 Aug 2011 16:18:55 -0700, Chris Withers wrote: > > I've got a tree of nested dicts that at their leaves end in numpy arrays > > of identical sizes. > > > > What's the easiest way to persist these to disk so that I can pick up > >

Re: [Numpy-discussion] PyBUF_SIMPLE/PyBUF_FORMAT: casts to unsigned bytes

2011-08-24 Thread Dag Sverre Seljebotn
(sorry for the top-post, no way around it) Under 2), would it make sense to also export the contents of a Fortran-contiguous buffer as a raw byte stream? I was just the other week writing code to serialize an array in Fortran order to a binary stream. OTOH I could easily serialize its transpose