Re: [Numpy-discussion] Help with user-defined data type

2008-02-17 Thread Robert Kern
On Feb 17, 2008 3:27 PM, Neal Becker [EMAIL PROTECTED] wrote: Are there any examples of user-defined data types that I could get hold of? I think you may be the first. The problems you encounter may well be bugs rather than problems with your code. -- Robert Kern I have come to believe

Re: [Numpy-discussion] Rename record array fields

2008-02-20 Thread Robert Kern
]: newdt = dtype([('notfoo', int), ('notbar', float)]) In [6]: b = a.view(newdt) In [7]: b Out[7]: array([(0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0), (0, 0.0)], dtype=[('notfoo', 'i4'), ('notbar', 'f8')]) -- Robert Kern I have come

Re: [Numpy-discussion] bug in numpy.histogram?

2008-02-20 Thread Robert Kern
you. -- 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

Re: [Numpy-discussion] Problems installing numpy on Mac OS 10.4

2008-02-22 Thread Robert Kern
the entire output. -- 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] numpy 1:1.0.4: numpy.average() returns the wrong result with weights

2008-02-22 Thread Robert Kern
in. How can I create an account? That should have done it. When you say you are denied, exactly what happens? I've run into times when I've logged in and I get the unaltered front page again. Logging in again usually works. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] Problems installing numpy on Mac OS 10.4

2008-02-22 Thread Robert Kern
Developer Connection. -- 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] How do I change endianess?

2008-02-25 Thread Robert Kern
. import numpy dt = numpy.dtype(numpy.int32).newbyteorder('') -- 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.random.randint() inconsistent with plain random.randint()

2008-02-25 Thread Robert Kern
. numpy.random is not intended to replace the standard library's random module. -- 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] Optimize speed of for loop using numpy

2008-02-25 Thread Robert Kern
that the indentation is preserved? Feel free to attach it as a text file. Also, can you describe at a higher level what it is you are trying to accomplish and what the arrays mean? -- 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] Optimize speed of for loop using numpy

2008-02-25 Thread Robert Kern
by using searchsorted(). -- 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] FORTRAN compiler detection

2008-02-26 Thread Robert Kern
something off the top of their heads. Which FORTRAN compilers do you have installed? What --fcompiler flag are you using? -- 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] FORTRAN compiler detection

2008-02-26 Thread Robert Kern
On Tue, Feb 26, 2008 at 12:09 PM, Christopher Hanley [EMAIL PROTECTED] wrote: Robert Kern wrote: On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley [EMAIL PROTECTED] wrote: Greetings, I was wondering if within the last 8 - 10 weeks anyone has made changes to the way FORTRAN

Re: [Numpy-discussion] FORTRAN compiler detection

2008-02-26 Thread Robert Kern
On Tue, Feb 26, 2008 at 12:46 PM, Christopher Hanley [EMAIL PROTECTED] wrote: Robert Kern wrote: On Tue, Feb 26, 2008 at 12:09 PM, Christopher Hanley [EMAIL PROTECTED] wrote: Robert Kern wrote: On Tue, Feb 26, 2008 at 11:50 AM, Christopher Hanley [EMAIL PROTECTED] wrote

Re: [Numpy-discussion] masked_array/matplotlib issue with memmaps

2008-02-26 Thread Robert Kern
. A workaround would be to make numpy.memmap.__del__ more robust and do nothing if ._mmap isn't present. A real fix would be to figure out how to make sure that memmap+memmap, etc., make ndarray instances rather than memmap instances. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] loadtxt broken if file does not end in newline

2008-02-27 Thread Robert Kern
On Wed, Feb 27, 2008 at 4:04 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Did this discussion resolve with a fix that can go in before 1.0.5 is released? Fixed in r4827. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Handling of numpy.power(0, something)

2008-02-27 Thread Robert Kern
+NaNi Any reactions to this? Does NumPy just make library calls when computing power, or does it do any trapping of corner cases? And should the returns from power conform to the above suggestions? In this case, I think Matlab looks about right. -- Robert Kern I have come

Re: [Numpy-discussion] loadtxt broken if file does not end in newline

2008-02-27 Thread Robert Kern
On Wed, Feb 27, 2008 at 6:31 PM, Christopher Barker [EMAIL PROTECTED] wrote: Robert Kern wrote: Fixed in r4827. Thanks Robert. For the record, this is the fixed version: comment_start = line.find(comments) if comment_start 0: line = line[:comments_start

Re: [Numpy-discussion] loadtxt broken if file does not end in newline

2008-02-27 Thread Robert Kern
On Thu, Feb 28, 2008 at 12:12 AM, Alan G Isaac [EMAIL PROTECTED] wrote: On Wed, 27 Feb 2008, Robert Kern apparently wrote: Fixed in r4827. On Wed, Feb 27, 2008 at 6:31 PM, Christopher Barker wrote: For the record, this is the fixed version: comment_start = line.find

Re: [Numpy-discussion] numpyx.pyx (recent svn) works?

2008-02-28 Thread Robert Kern
On Thu, Feb 28, 2008 at 7:35 AM, Neal Becker [EMAIL PROTECTED] wrote: I tried numpyx.pyx with cython-0.9.6.12. These were written for and still work with Pyrex. If it doesn't work with Cython then that is either a bug in Cython or an intentional incompatibility of Cython. -- Robert Kern I

Re: [Numpy-discussion] Rename record array fields (with object arrays)

2008-02-28 Thread Robert Kern
. Click on the Register link in the upper right-hand corner. -- 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] Handling of numpy.power(0, something)

2008-02-28 Thread Robert Kern
)) == cexp((-inf-inf*1j)) == (+-0 + (+-0j)) where the signs are unspecified by the standard. So numpy's behavior happens to be correct for power(0.0, (1+1j)). It is incorrect for power(0.0, (-1.0+0j)). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] arrays of matrices

2008-02-28 Thread Robert Kern
of '03? -- 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

Re: [Numpy-discussion] arrays of matrices

2008-02-28 Thread Robert Kern
, class of '03? Yep. That would answer the question I had when I started reading this email. However, it's spelled Caltech, not CalTech! Yeah, yeah, yeah. The Wikis, they have taken over my finger ReFlexes. NumPy Rudds += 1. Take that, Tim Hochberg! :-) -- Robert Kern I have come

Re: [Numpy-discussion] contiguous true

2008-02-29 Thread Robert Kern
, False, False, False, False, False, False, False, False], dtype=bool) In [65]: nonzero(mask)[0][0] Out[65]: 14 In [66]: x[13:20] Out[66]: array([False, True, True, True, True, True, False], dtype=bool) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] failure building numpy using icc

2008-03-01 Thread Robert Kern
of functions to figure out exactly what is going on. Any hints/suggestions? Off-hand, no, sorry. I'm not sure why the compiler would matter in this part of the code, though. Can you try using gcc on the same machine? -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] how to pronounce numpy?

2008-03-01 Thread Robert Kern
, this assertion NumPy (pronounced Num Pie, Num as in Number) ... whould be valid? Yes, that is how I pronounce 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 attempt to interpret it as though it had

Re: [Numpy-discussion] Pickling and initializing

2008-03-03 Thread Robert Kern
that. The signature of pickle.dump() is pickle.dump(f, obj) and the signature of pickle.load() is obj = pickle.load(f) where `f` is an open file object. There is no need to pre-declare `obj` before loading it. If not, why not and doesn't this make documentation difficult? Not particularly, no. -- Robert

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] 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-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] 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] 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] 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-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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] [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] 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] 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] 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] 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] 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] 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] 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] 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] [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] 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] 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] [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

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