Re: [Numpy-discussion] cPickle/unPickle across archs

2010-01-07 Thread Robert Kern
that patched function to reconstruct the arrays and make sure that the appropriate typecode is used to interpret the data. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] 1.4.0 installer fails on OSX 10.6.2

2010-01-07 Thread Robert Kern
that. It's not really true, though. MacPorts took /opt/local/, but /opt/yourbrandnamehere/ probably hasn't been. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] [matplotlib-devel] Announcing toydist, improving distribution and packaging situation

2010-01-03 Thread Robert Kern
sandbox), not virtualenv (every project gets it's own sandbox). The former feature has a long history in the multiuser UNIX world and is not really controversial. http://www.python.org/dev/peps/pep-0370/ -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] is it safe to change the dtype without rebuilding the array?

2010-01-01 Thread Robert Kern
Is it okay? The problem is that it's not easy to rebuild the array. I tried with: y.astype(dt) np.array(y, dt) np.array(y.tolist(), dt) None worked. y.view(dt) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own

Re: [Numpy-discussion] Announcing toydist, improving distribution and packaging situation

2009-12-30 Thread Robert Kern
- overwhelmingly. Linux distributions, which are much, much more popular than any collection of packages on PyPI you might care to name. Isolated environments have their uses, but they are the exception, not the rule. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] Announcing toydist, improving distribution and packaging situation

2009-12-30 Thread Robert Kern
On Wed, Dec 30, 2009 at 13:10, René Dudfield ren...@gmail.com wrote: On Wed, Dec 30, 2009 at 7:08 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, Dec 30, 2009 at 12:47, René Dudfield ren...@gmail.com wrote: 500+ packages on pypi.   Provide a counter point, otherwise the evidence

Re: [Numpy-discussion] [ANN] numpy 1.4.0 rc2

2009-12-28 Thread Robert Kern
, but shouldn't have affected anything in matplotlib. The traceback may help us identify the issue you are seeing. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] cos -- NameError: global name 'cos' is not defined

2009-12-21 Thread Robert Kern
() and acos() and sin(). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion

Re: [Numpy-discussion] cos -- NameError: global name 'cos' is not defined

2009-12-21 Thread Robert Kern
one is forced to use math.cos(). Why one but not the other? Presumably you have imported it somewhere. Please show your program, and we may be able to point it out to you. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our

Re: [Numpy-discussion] help(numpy.dot) Hmmm.

2009-12-20 Thread Robert Kern
On Sun, Dec 20, 2009 at 22:44, Wayne Watson sierra_mtnv...@sbcglobal.net wrote: 1.2.0. Did you find the description in the reference manual? No, he found it using help(numpy.dot) using a more recent version of numpy. I highly recommend upgrading. -- Robert Kern I have come to believe

Re: [Numpy-discussion] Segmentation fault with argsort

2009-12-18 Thread Robert Kern
no attribute 'argsort' Why would you expect that? On OS X with an SVN checkout ~1.4: In [1]: np.array(121).argsort(0).argsort(0) Out[1]: 0 In [6]: np.int64.argsort Out[6]: method 'argsort' of 'numpy.generic' objects -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] Segmentation fault with argsort

2009-12-18 Thread Robert Kern
On Fri, Dec 18, 2009 at 11:57, Skipper Seabold jsseab...@gmail.com wrote: On Fri, Dec 18, 2009 at 12:52 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Dec 18, 2009 at 11:46, Keith Goodman kwgood...@gmail.com wrote: I am using the numpy 1.3 binary from Ubuntu 9.10. Is this already known

Re: [Numpy-discussion] Proposal for matrix_rank function in numpy

2009-12-18 Thread Robert Kern
for numerical work. I just don't want documentation examples to be doctests. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] np.void from 0d array + subclassing

2009-12-17 Thread Robert Kern
, provided the element can be accessed, ie that n0. A 0D array cannot be indexed, so I don't know how capture the object below. The sad trick I found was to do a .reshape(1)[0], but that looks really overkill... a[()] -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] np.void from 0d array + subclassing

2009-12-17 Thread Robert Kern
On Thu, Dec 17, 2009 at 17:41, Pierre GM pgmdevl...@gmail.com wrote: On Dec 17, 2009, at 6:35 PM, Robert Kern wrote: On Thu, Dec 17, 2009 at 16:11, Pierre GM pgmdevl...@gmail.com wrote: Here's the catch: IIUC, each individual element of a nD structured array is a void, provided the element

Re: [Numpy-discussion] Proposal for matrix_rank function in numpy

2009-12-15 Thread Robert Kern
. Van Loan, _Matrix Computations_. Baltimore: Johns Hopkins University Press, 1996. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] no ordinary Bessel functions?

2009-12-14 Thread Robert Kern
]: %timeit special.i0(1.0) 10 loops, best of 3: 5.6 µs per loop -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Import error in builds of 7726

2009-12-12 Thread Robert Kern
Referenced from: /Library/Python/2.6/site-packages/ numpy-1.4.0.dev7726-py2.6-macosx-10.6-universal.egg/ numpy/core/umath.so Expected in: flat namespace in /Library/Python/2.6/site-packages/ numpy-1.4.0.dev7726-py2.6-macosx-10.6-universal.egg /numpy/core/umath.so -- Robert Kern I have come

Re: [Numpy-discussion] nan_to_num and bool arrays

2009-12-11 Thread Robert Kern
) False No, that's the other way around, converting floats to bools. Converting bools to floats is trivial: True-1.0, False-0.0. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: [Numpy-discussion] nan_to_num and bool arrays

2009-12-11 Thread Robert Kern
arrays and float columns in structured arrays, but the current code does not handle either of those anyways. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] nan_to_num and bool arrays

2009-12-11 Thread Robert Kern
On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote: On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Dec 11, 2009 at 14:41, Keith Goodman kwgood...@gmail.com wrote: On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey bsout...@gmail.com wrote

Re: [Numpy-discussion] nan_to_num and bool arrays

2009-12-11 Thread Robert Kern
On Fri, Dec 11, 2009 at 17:44, Keith Goodman kwgood...@gmail.com wrote: On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote: On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote

Re: [Numpy-discussion] nan_to_num and bool arrays

2009-12-11 Thread Robert Kern
. This is the problem I was referring to: I think that sequences should be coerced to arrays for output and this check should be more explicit about what it handles. [1.0] will have a problem if you don't. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] nan_to_num and bool arrays

2009-12-11 Thread Robert Kern
= (1,)    t = y.dtype.type    if issubclass(t, _nx.complexfloating):        return nan_to_num(y.real) + 1j * nan_to_num(y.imag) Almost! You need to handle the shape restoration in this branch, too. In [9]: nan_to_num(array(1+1j)) Out[9]: array([ 1.+1.j]) -- Robert Kern I have come to believe

Re: [Numpy-discussion] [Nipy-devel] Impossibility to build nipy on recent numpy?

2009-12-10 Thread Robert Kern
to go ahead :). It's your problem. :-) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Assigning complex values to a real array

2009-12-10 Thread Robert Kern
people from wasting days. (Hopefully, we can avoid wasting days discussing this issue too :-) ). Yes. We can even make it a PendingDeprecationWarning, when we become convinced that this feature should go away in entirety. PendingDeprecationWarnings are off by default, I think. -- Robert Kern I

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-09 Thread Robert Kern
On Wed, Dec 9, 2009 at 01:41, Anne Archibald peridot.face...@gmail.com wrote: 2009/12/8 Robert Kern robert.k...@gmail.com:  olderr = np.seterr(divide='ignore', invalid='ignore')  try:    result = self.f(da, db, *args, **kwargs)  finally:    np.seterr(**olderr) Doesn't this risk a ctrl-C

Re: [Numpy-discussion] numpy distutils breaks scipy install on mac

2009-12-09 Thread Robert Kern
On Wed, Dec 9, 2009 at 14:03, Mark Sienkiewicz sienk...@stsci.edu wrote: Robert Kern wrote: On Tue, Dec 8, 2009 at 15:36, Mark Sienkiewicz sienk...@stsci.edu wrote: ( Presumably, some other version of gfortan does accept -arch, or this code wouldn't be here, right? ) Right. The -arch flag

Re: [Numpy-discussion] Impossibility to build nipy on recent numpy?

2009-12-09 Thread Robert Kern
(1.3). Does anybody know if the cython folks are going to work around that anytime soon (I am not on the cython mailing list, so I am not asking there)? Yes. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] Impossibility to build nipy on recent numpy?

2009-12-09 Thread Robert Kern
: rm -rf build rm -f numpy/core/include/numpy/__multiarray_api.c numpy/core/include/numpy/__multiarray_api.h numpy/core/include/numpy/__ufunc_api.c numpy/core/include/numpy/__ufunc_api.h numpy/core/include/numpy /__umath_generated.c rm -f `find . -name *.so` -- Robert Kern I

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-08 Thread Robert Kern
for underflow, which should remain ignore). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Cython issues w/ 1.4.0

2009-12-08 Thread Robert Kern
a cython problem. It's *entirely* a Cython problem. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-08 Thread Robert Kern
On Tue, Dec 8, 2009 at 11:41, David Cournapeau courn...@gmail.com wrote: On Wed, Dec 9, 2009 at 1:21 AM, Robert Kern robert.k...@gmail.com wrote: The default has always been print, not warn (except for underflow, which was ignore). Ah, ok, that explains part of the misunderstanding, sorry

Re: [Numpy-discussion] Cython issues w/ 1.4.0

2009-12-08 Thread Robert Kern
, at least for Numpy. They appear to be. See the latest messages in the thread Checking extension type sizes. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] What protocol to use now?

2009-12-08 Thread Robert Kern
. PEP 3118 is not yet implemented by numpy, and the PEP 3118 API won't be available to Python's 2.6 (Cython's workarounds notwithstanding). Pauli, did we discuss this before you wrote that warning and I'm just not remembering it? -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] Cython issues w/ 1.4.0

2009-12-08 Thread Robert Kern
On Tue, Dec 8, 2009 at 14:52, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: Robert Kern wrote: On Tue, Dec 8, 2009 at 12:38, Pauli Virtanen p...@iki.fi wrote: - We need to cache the buffer protocol format string somewhere,  if we do not want to regenerate it on each buffer

Re: [Numpy-discussion] Release blockers for 1.4.0 ?

2009-12-08 Thread Robert Kern
On Tue, Dec 8, 2009 at 15:25, Pierre GM pgmdevl...@gmail.com wrote: On Dec 8, 2009, at 12:54 PM, Robert Kern wrote: As far as I can tell, the faulty global seterr() has been in place since 1.1.0, so fixing it at all should be considered a feature change. It's not likely to actually *break

Re: [Numpy-discussion] numpy distutils breaks scipy install on mac

2009-12-08 Thread Robert Kern
build that I can recommend is here: http://r.research.att.com/tools/ _can_target() should be fixed to be more accurate, though, so if you find a patch that works for you, please let us know. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] What protocol to use now?

2009-12-08 Thread Robert Kern
On Tue, Dec 8, 2009 at 15:44, Christopher Barker chris.bar...@noaa.gov wrote: Robert Kern wrote: The array interface was made for this sort of thing, but is deprecated: http://docs.scipy.org/doc/numpy/reference/arrays.interface.html I think the wording is overly strong. I don't think that we

Re: [Numpy-discussion] What protocol to use now?

2009-12-08 Thread Robert Kern
to incorporate it into numpy 1.5 ... The Cython information is still nice. Also, it should not be a warning, just a note, since there is no impending deprecation to warn about. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Can't set an element of a subset of an array, , ,

2009-12-08 Thread Robert Kern
to the copy, which then gets thrown away. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy

Re: [Numpy-discussion] re cfunctions help with concatenating (vstack, hstack, etc.)

2009-12-07 Thread Robert Kern
retain the default usemask=True option). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy

Re: [Numpy-discussion] Some incompatibilities in numpy trunk

2009-12-06 Thread Robert Kern
into a = check, but it got no traction. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy

Re: [Numpy-discussion] ANN: qimage2ndarray - converting between QImages and numpy.ndarrays

2009-12-02 Thread Robert Kern
is fine to include in that application. Look at the file GPL_EXCEPTION.TXT . -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] make hstack and vstack promote 1-D argument to 2-D when necessary

2009-11-23 Thread Robert Kern
to use column_stack() which explicitly treats 1D arrays like columns. Otherwise, just use column vectors explicitly. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-19 Thread Robert Kern
On Thu, Nov 19, 2009 at 01:43, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robert Kern wrote:  One can have a proprietary application statically linked with an LGPL library. The only detail there is that, in order to satisfy the user must be able to relink the application

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread Robert Kern
() to find the objects that are holding direct references to your memmap. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Applying argwhere to an array

2009-11-19 Thread Robert Kern
on them, too. So, if d.shape == (N, 10), let's say, then you could do: np.argwhere(d [1,1,1,1,1,2,2,2,2,2]) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] lstsq illegal instruction

2009-11-18 Thread Robert Kern
SSE2 instructions while your CPU doesn't. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] matplotlib and numpy cause MemoryError

2009-11-18 Thread Robert Kern
. A MemoryError is raised when numpy cannot allocate enough memory on your system. If dims is too large for some reason, you could run into that limit. It might be because what you are trying to plot is simply too large or there might possibly (but unlikely) be a bug that is miscalculating dims. -- Robert

Re: [Numpy-discussion] memmap limits

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 17:43, Mathew Yeates mat.yea...@gmail.com wrote: What limits are there on file size when using memmap? With a modern filesystem, usually you are only limited to the amount of contiguous free space in your process's current address space. -- Robert Kern I have come

Re: [Numpy-discussion] memmap limits

2009-11-18 Thread Robert Kern
to address a lot more than 4 GB. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread Robert Kern
to the library source. For compiled code, it is generally admitted that if you use the library as a shared library (dynamic linking), the program you link to is not derivative, and hence can be any license you want. Not at all. The FSF and a large proportion of GPL users claim otherwise. -- Robert Kern I

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-18 Thread Robert Kern
On Wed, Nov 18, 2009 at 23:39, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: Robert Kern wrote: On Wed, Nov 18, 2009 at 22:52, David Cournapeau da...@ar.media.kyoto-u.ac.jp wrote: René Dudfield wrote: pygame is also LGPL... as are a number of other libraries.  (pyqt is GPL btw

Re: [Numpy-discussion] REMINDER: trunk is about to be frozen for 1.4.0

2009-11-17 Thread Robert Kern
and then just a freeze on features. This is a bug fix that can be checked into the 1.4 branch once David is finished. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] Strange inversion in shape with some slices

2009-11-17 Thread Robert Kern
convinced by it. My reading of that thread is, that the observed bug is mostly a consequence coming from the way fancy indexing is implemented. How about deprecating this kind of index mixing !? No. When you need it, you need it. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] Unexpected attribute error

2009-11-17 Thread Robert Kern
to take the sqrt of None in the first place. How about adding some information to the AttributeError, such as the object on which the lookup failed (here None, as opposed to the numpy module). Patches welcome. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Robert Kern
-topic question: Is there a way to avoid importing everything when importing a module deep in a big package? The package authors need to keep the __init__.py files clear. There is nothing you can do as a user. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Robert Kern
On Mon, Nov 16, 2009 at 18:39, Christopher Barker chris.bar...@noaa.gov wrote: Robert Kern wrote: Is there a way to avoid importing everything when importing a module deep in a big package? The package authors need to keep the __init__.py files clear. There is nothing you can do as a user

Re: [Numpy-discussion] Summing an array with dtype=object

2009-11-15 Thread Robert Kern
rather than np.object_ scalars. In [2]: a Out[2]: array([0, 1, 2], dtype=object) In [5]: type(a[0]) Out[5]: int -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] bus error in embedded numpy

2009-11-13 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion

Re: [Numpy-discussion] Is a 4 -bit int dtype possible

2009-11-13 Thread Robert Kern
On Fri, Nov 13, 2009 at 19:33, Brian Granger ellisonbg@gmail.com wrote: Hi, I have a large binary data set that has 4-bit integers in it.  It is possible to create a numpy dtype for a 4-bit integer? Not really. We have 1-byte atomicity. -- Robert Kern I have come to believe

Re: [Numpy-discussion] finding close together points.

2009-11-12 Thread Robert Kern
://www.mail-archive.com/numpy-discussion@scipy.org/msg21010.html -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Initial implementation of histogram_discrete()

2009-11-12 Thread Robert Kern
On Thu, Nov 12, 2009 at 17:25, josef.p...@gmail.com wrote: If I could make a related wish, I wish np.bincount to take also a 2d array as weights. It does. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt

Re: [Numpy-discussion] Multiple Regression

2009-11-12 Thread Robert Kern
== (5000, number_of_different_y_vectors)) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Initial implementation of histogram_discrete()

2009-11-12 Thread Robert Kern
On Thu, Nov 12, 2009 at 20:12, josef.p...@gmail.com wrote: On Thu, Nov 12, 2009 at 6:31 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, Nov 12, 2009 at 17:25,  josef.p...@gmail.com wrote: If I could make a related wish, I wish np.bincount to take also a 2d array as weights. It does

Re: [Numpy-discussion] unittest for np.random.poisson with lambda=0

2009-11-11 Thread Robert Kern
is, is this still a valid concern for the current numpy? No. Could there a unittest added that does something like this: a=N.random.poisson(0, 1) N.alltrue(a==0) True Write up a patch. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] unittest for np.random.poisson with lambda=0

2009-11-11 Thread Robert Kern
to start. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] finding close together points.

2009-11-10 Thread Robert Kern
API may be easier (both Obj-C and Python C API being based on ref counting).    - Another one mentioned by Robert Kern, I forgot the reference. http://c-algorithms.sourceforge.net/ -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Who is ariver and why does it keep making test commits?

2009-11-09 Thread Robert Kern
: 2009.11.04.17.33.56 +ariver: 2009.11.09.08.30.47 Which are 1) pointless, and 2) look almost automated. Anyone know what this is about? Aaron River is our sysadmin. He is working on fixing the checkin mailing lists. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] initializing an array of lists

2009-11-09 Thread Robert Kern
list object. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API

2009-11-09 Thread Robert Kern
]: linalg.flapack.dgeev._cpointer Out[4]: PyCObject at 0x3435500 -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-05 Thread Robert Kern
words, why is it that numpy.array needs the binary mode while list does not? I'm not sure what to say except because it does. Pickles don't necessarily contain binary data, particularly using the default protocol=0 and only builtin types, but they may. Always use 'wb'. -- Robert Kern I have come

Re: [Numpy-discussion] converting discrete data to unique integers

2009-11-04 Thread Robert Kern
in enumerate(set(a))) I'd toss in a sorted() just to keep the mapping stable. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-02 Thread Robert Kern
/ If you can attach the offending pickle files, that would be ideal. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] odd behaviour with basic operations

2009-11-01 Thread Robert Kern
should happen then. A better way to do what you want is to use where(): Pd = numpy.where(C_02 0.0, Pd_pos, Pd_neg) Ps = numpy.where(C_02 0.0, Ps_pos, Ps_neg) Change the to = if you want C_02==0 to use the pos values. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] Ignorance question

2009-11-01 Thread Robert Kern
a tone that suggests there are more sophisticated ways to generate a random Brownian signal? Or is wald indeed SotA?  Thanks! What's a SotA? State of the Art -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: [Numpy-discussion] Random int64 and float64 numbers

2009-11-01 Thread Robert Kern
here? I know of none. Floating point is a bit weird and will cause you many problems over such an extended range. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: [Numpy-discussion] Random int64 and float64 numbers

2009-11-01 Thread Robert Kern
On Sun, Nov 1, 2009 at 22:17, Sturla Molden stu...@molden.no wrote: Robert Kern skrev: 64-bit and larger integers could be done, but it requires modification. The integer distributions were written to support C longs, not anything larger. You could also use .bytes() and np.fromstring

Re: [Numpy-discussion] Random int64 and float64 numbers

2009-11-01 Thread Robert Kern
On Sun, Nov 1, 2009 at 23:14, Sturla Molden stu...@molden.no wrote: I'll call this a bug. Yes. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth

Re: [Numpy-discussion] type 'numpy.int64' unhashable

2009-10-30 Thread Robert Kern
. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-10-30 Thread Robert Kern
to change versions, by the way, since this is the version that my working group has decided on to standardize on for this effort. You can import numpy.core.multiarray on both machines? -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Numpy-discussion] Numpy/Scipy for EC2

2009-10-29 Thread Robert Kern
should start with. I haven't used it, but this seems to provide a good environment for your needs. http://web.mit.edu/stardev/cluster/ -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though

Re: [Numpy-discussion] [RFC] new function for floating point comparison

2009-10-29 Thread Robert Kern
of detail that is otherwise unavailable. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] reading gzip compressed files using numpy.fromfile

2009-10-28 Thread Robert Kern
, but these files are rather big, so I simply have to avoid this. Read in reasonably-sized chunks of bytes at a time, and use np.fromstring() to create arrays from them. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Robert Kern
On Thu, Oct 22, 2009 at 02:35, Sturla Molden stu...@molden.no wrote: Robert Kern skrev: No, I think you're right. Using SIMD to refer to numpy-like operations is an abuse of the term not supported by any outside community that I am aware of. Everyone else uses SIMD to describe hardware

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Robert Kern
On Thu, Oct 22, 2009 at 06:20, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: Robert Kern wrote: On Wed, Oct 21, 2009 at 22:32, Mathieu Blondel math...@mblondel.org wrote: On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden stu...@molden.no wrote: Mathieu Blondel skrev: Hello, About

Re: [Numpy-discussion] TypeError when calling numpy.kaiser()

2009-10-21 Thread Robert Kern
appropriate one) and no more. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Robert Kern
of a single syntactical element of a high level language to a non-trivial data structure containing lots of atomic data elements. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] user defined types

2009-10-19 Thread Robert Kern
does. We do have an example in doc/newdtype_example/. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] [SciPy-User] vectorized version of 'multinomial' sampling function

2009-10-13 Thread Robert Kern
? Yes because the iteration, if written correctly, will be in C. This is all that vectorization means in this context. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] PyArray_FROM_OF from Cython

2009-10-08 Thread Robert Kern
import_array() at the top level before you can use any numpy C API functions. http://wiki.cython.org/tutorials/numpy#UsingtheNumpyCAPI -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had

Re: [Numpy-discussion] PyArray_FROM_OF from Cython

2009-10-08 Thread Robert Kern
On Thu, Oct 8, 2009 at 19:32, David Warde-Farley d...@cs.toronto.edu wrote: On 8-Oct-09, at 6:47 PM, Robert Kern wrote: On Thu, Oct 8, 2009 at 17:28, David Warde-Farley d...@cs.toronto.edu wrote: I'm trying to use PyArray_FROM_OF from Cython and the generated C code keeps crashing.  Dag

Re: [Numpy-discussion] Building a new copy of NumPy

2009-10-07 Thread Robert Kern
to re-built matplotlib, and now scipy. Known issue. See the thread Numpy SVN broken. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] Questions about masked arrays

2009-10-07 Thread Robert Kern
On Wed, Oct 7, 2009 at 12:35, Gökhan Sever gokhanse...@gmail.com wrote: Do you know what shortcut name is used for scipy package itself? I do not recommend using import scipy or import scipy as Import the subpackages directly (e.g. from scipy import linalg). -- Robert Kern I have come

Re: [Numpy-discussion] NumPy SVN broken

2009-10-07 Thread Robert Kern
our structures and all to make them more robust to those changes (using pimp-like strategies in particular). Sorry, I mean pimple, not pimp (makes you wonder what goes in my head): Indeed! (And it's pimpl.) :-) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] numpy.asum ?

2009-10-05 Thread Robert Kern
in the array. amax(x) is a convenience for maximum.reduce(x.flat). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] numpy.asum ?

2009-10-05 Thread Robert Kern
deprecate it. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] numpy.asum ?

2009-10-05 Thread Robert Kern
On Mon, Oct 5, 2009 at 14:55, Sebastian Haase seb.ha...@gmail.com wrote: On Mon, Oct 5, 2009 at 8:43 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Oct 5, 2009 at 13:37, Sebastian Haase seb.ha...@gmail.com wrote: Thanks for the reply. I thought one reason for amax was that from numpy

Re: [Numpy-discussion] What Python version are we supporting ?

2009-10-05 Thread Robert Kern
On Mon, Oct 5, 2009 at 17:03, Pierre GM pgmdevl...@gmail.com wrote: All, What Python version are we supporting in 1.4.0dev ? 2.4 still ? Yes. For which version of numpy will we be moving to a more recent one ? There is no plan in place to change this requirement. -- Robert Kern I have

<    5   6   7   8   9   10   11   12   13   14   >