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] performance matrix multiplication vs. matlab

2010-01-08 Thread Robert Kern
implementation for numpy when their is no blas installed. I think the license would allow to include it in numpy directly. It is licensed under the LGPLv3, so it is not compatible with the numpy license. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Numpy-discussion] TypeError: 'module' object is not callable

2010-01-11 Thread Robert Kern
scipy.sparse.linalg.eigen(...)? Please show the complete code and the complete traceback. -- 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] TypeError: 'module' object is not callable

2010-01-11 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

Re: [Numpy-discussion] numpy1.4 dtype issues: scipy.stats pytables

2010-01-12 Thread Robert Kern
, how'd it get past testing ?) It's not a bug, but it is a known issue. We tried very hard to keep numpy 1.4 binary compatible; however, Pyrex and Cython impose additional runtime checks above and beyond binary compatibility. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] wrong casting of augmented assignment statements

2010-01-12 Thread Robert Kern
modifies numpy arrays in-place, so the usual casting rules for assignment into an array apply. Namely, the array being assigned into keeps its dtype. If you do not want in-place modification, do not use augmented assignment. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] wrong casting of augmented assignment statements

2010-01-12 Thread Robert Kern
On Tue, Jan 12, 2010 at 12:31, Sebastian Walter sebastian.wal...@gmail.com wrote: On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jan 12, 2010 at 12:05, Sebastian Walter sebastian.wal...@gmail.com wrote: Hello, I have a question about the augmented assignment

Re: [Numpy-discussion] dtype.isbuiltin changed by .newbyteorder

2010-01-14 Thread Robert Kern
the resulting dtype to not be considered builtin. -- 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] Wanted: new release manager for 1.5 and above

2010-01-15 Thread Robert Kern
On Fri, Jan 15, 2010 at 08:46, Ralf Gommers ralf.gomm...@googlemail.com wrote: Is it necessary to have OS X to build the dmg installer, or could you build that from linux with some modifications to the build script? No, you need OS X to build and package the OS X binaries. -- Robert Kern I

Re: [Numpy-discussion] Percentiles and Box Plots

2010-01-15 Thread Robert Kern
for getting at the Box Plot quartiles, and ranges. I think that's the simplest set for Box plots. I don't need to draw anything. Use scipy.stats.scoreatpercentile() -- 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] performance matrix multiplication vs. matlab

2010-01-17 Thread Robert Kern
, as a matter of policy, do not wish to impose on numpy users. -- 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] performance matrix multiplication vs. matlab

2010-01-17 Thread Robert Kern
On Sun, Jan 17, 2010 at 12:11, Benoit Jacob jacob.benoi...@gmail.com wrote: 2010/1/17 Robert Kern robert.k...@gmail.com: On Sun, Jan 17, 2010 at 08:52, Benoit Jacob jacob.benoi...@gmail.com wrote: 2010/1/17 David Cournapeau courn...@gmail.com: There are several issues with eigen2 for NumPy

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2010-01-17 Thread Robert Kern
On Sun, Jan 17, 2010 at 13:18, Benoit Jacob jacob.benoi...@gmail.com wrote: 2010/1/17 Robert Kern robert.k...@gmail.com: On Sun, Jan 17, 2010 at 12:11, Benoit Jacob jacob.benoi...@gmail.com wrote: 2010/1/17 Robert Kern robert.k...@gmail.com: On Sun, Jan 17, 2010 at 08:52, Benoit Jacob

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2010-01-18 Thread Robert Kern
numpy+Eigen2, in its entirety, under the terms of the BSD license, we would have to get permission from you to distribute Eigen2 under the BSD license. It's only polite. -- 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] performance matrix multiplication vs. matlab

2010-01-18 Thread Robert Kern
On Mon, Jan 18, 2010 at 10:26, Benoit Jacob jacob.benoi...@gmail.com wrote: 2010/1/18 Robert Kern robert.k...@gmail.com: On Mon, Jan 18, 2010 at 09:35, Benoit Jacob jacob.benoi...@gmail.com wrote: Sorry for continuing the licensing noise on your list --- I though that now that I've started, I

Re: [Numpy-discussion] performance matrix multiplication vs. matlab

2010-01-18 Thread Robert Kern
, particularly not as the default linear algebra implementation, because we wish to keep numpy's source as being only BSD. This is a policy decision of the numpy team, not a legal incompatibility. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Is this expected behavior?

2010-01-18 Thread Robert Kern
. The data you expected it to read has already been wiped out. -- 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] Is this expected behavior?

2010-01-18 Thread Robert Kern
. It would create a weird special case in the semantics, and slow down common assignments that don't have the issue. It would be nice to have a fast in-place roll(), though this is not how one should implement it. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] how to do a proper 2 column sort on a 2 dimensional array ??

2010-01-19 Thread Robert Kern
by the second column, now sort by the first column; where there are ties in the first column, the order is left alone from the previous sort on the second column. -- 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] Efficient orthogonalisation with scipy/numpy

2010-01-19 Thread Robert Kern
to the space spanned by the 10 orthonormal vectors in confounds? Most of the time is spent in linalg.lstsq. The length of the vectors is 810, and there are about 10 confounds. Exactly what are the shapes? y.shape = (810, N); confounds.shape = (810, 10)? -- Robert Kern I have come to believe

Re: [Numpy-discussion] Efficient orthogonalisation with scipy/numpy

2010-01-19 Thread Robert Kern
On Tue, Jan 19, 2010 at 14:47, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Jan 19, 2010 at 02:22:30PM -0600, Robert Kern wrote: y = y - np.dot(confounds.T, linalg.lstsq(confounds.T, y)[0]) with np = numpy and linalg = scipy.linalg where scipy calls ATLAS. For clarification

Re: [Numpy-discussion] Efficient orthogonalisation with scipy/numpy

2010-01-19 Thread Robert Kern
On Tue, Jan 19, 2010 at 15:12, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Jan 19, 2010 at 02:58:32PM -0600, Robert Kern wrote: I am not sure that what I am doing is optimal. If confounds is orthonormal, then there is no need to use lstsq().   y = y - np.dot(np.dot(confounds

Re: [Numpy-discussion] Efficient orthogonalisation with scipy/numpy

2010-01-19 Thread Robert Kern
. Is the order actually guaranteed? In a quick test, it seems to work. In any case, I suspect that needing to do both x and y will make doing the QR once and some two pairs of dot products a better proposition than two QR decompositons. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] strange divergence in performance

2010-01-20 Thread Robert Kern
: 19.3 us per loop The difference is in the array[mask]. There are necessarily fewer True elements in the mask for 1 than 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 it had

Re: [Numpy-discussion] dtype and logical_and

2010-01-28 Thread Robert Kern
On Thu, Jan 28, 2010 at 10:31, Keith Goodman kwgood...@gmail.com wrote: I noticed that (logical and) does support float dtype: is not logical_and(). It is bitwise_and(). -- 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] Distutils issue? [migrated]

2010-01-29 Thread Robert Kern
able to make a lot of sense out of it. At over 2400 lines, it's a bit lengthy. Don't use CFLAGS. Please show the dump without that flag. Also, please show me the command line(s) that you are using to try to install numpy. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-02 Thread Robert Kern
it by adding a general feature to dtype objects such that they can hold arbitrary metadata. This is useful feature for more than just datetime support and should be complete and useful at this time. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-02 Thread Robert Kern
On Tue, Feb 2, 2010 at 21:08, David Cournapeau da...@silveregg.co.jp wrote: Robert Kern wrote: On Tue, Feb 2, 2010 at 20:23, Neil Martinsen-Burrell n...@wartburg.edu wrote: This is useful feature for more than just datetime support and should be complete and useful at this time. Couldn't

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-02 Thread Robert Kern
backward compatible, at least as far as scipy is concerned. So it seems the PyArray_Funcs change is the only ABI-incompatible change. Except for the Cython bit. -- 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] Determine if numpy is installed from an extension

2010-02-03 Thread Robert Kern
for the sans-numpy case. */ } else { Py_DECREF(mod); import_array(); /* ... set up for the with-numpy case. */ } -- 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] Removing datetime support for 1.4.x series ?

2010-02-03 Thread Robert Kern
* There will be no API changes in bugfix releases -- 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] Efficiently converting numpy record array to a list of dictionary

2010-02-04 Thread Robert Kern
', 'weight': 260.0}, {'age': 15, 'name': 'Fred', 'weight': 145.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 it had an underlying truth. -- Umberto Eco

Re: [Numpy-discussion] How long does it take to create an array?

2010-02-05 Thread Robert Kern
).reshape(-1)  # -- slow 1000 loops, best of 3: 832 us per loop timeit np.array([z[0] for z in x]) 1 loops, best of 3: 106 us per loop  # -- fast When array() gets a sequence of sequences, it has to do more work to figure out the appropriate shape. -- Robert Kern I have come to believe

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
be called a) 1.5.0 b) 2.0.0 My vote goes to b. You don't matter. Nor do I. Jarrod is on the steering committee. -- 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] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
On Mon, Feb 8, 2010 at 16:10, Matthew Brett matthew.br...@gmail.com wrote: On Mon, Feb 8, 2010 at 2:07 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Feb 8, 2010 at 16:05, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 5:05 PM, Jarrod Millman mill...@berkeley.edu wrote

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
everyone, not just a strong majority. http://producingoss.com/en/consensus-democracy.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] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
move on to a vote from the steering committee to formalize that majority. -- 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] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
. You should have spoken up sooner. We need to make a decision now. -- 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] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
be significantly worse if the strength of the logic gets confused with the strength of the premise. -- 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] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
On Mon, Feb 8, 2010 at 18:43, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 7:25 PM, Robert Kern robert.k...@gmail.com wrote: Here's the problem that I don't think many people appreciate: logical arguments suck just as much as personal experience in answering these questions

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
On Mon, Feb 8, 2010 at 20:50, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 7:52 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Feb 8, 2010 at 18:43, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 7:25 PM, Robert Kern robert.k...@gmail.com wrote: Here's

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
to get stuff done 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. -- Umberto Eco ___ NumPy-Discussion

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
On Mon, Feb 8, 2010 at 21:23, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 10:10 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Feb 8, 2010 at 20:50, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 7:52 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Feb

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-08 Thread Robert Kern
On Mon, Feb 8, 2010 at 21:27, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 10:24 PM, Robert Kern robert.k...@gmail.com wrote: On Mon, Feb 8, 2010 at 21:23, Darren Dale dsdal...@gmail.com wrote: On Mon, Feb 8, 2010 at 10:10 PM, Robert Kern robert.k...@gmail.com wrote: On Mon

Re: [Numpy-discussion] Emulate left outer join?

2010-02-09 Thread Robert Kern
with the selected entries. Matching is not preserved if there are some duplicates... For some reason, numpy.lib.recfunctions isn't in the documentation editor. I'm not sure why. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Emulate left outer join?

2010-02-09 Thread Robert Kern
On Tue, Feb 9, 2010 at 17:47, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, Feb 10, 2010 at 6:02 AM, Robert Kern robert.k...@gmail.com wrote: For some reason, numpy.lib.recfunctions isn't in the documentation editor. I'm not sure why. Because it's not in np.lib.__all__

Re: [Numpy-discussion] Emulate left outer join?

2010-02-09 Thread Robert Kern
On Tue, Feb 9, 2010 at 18:02, josef.p...@gmail.com wrote: On Tue, Feb 9, 2010 at 6:52 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Feb 9, 2010 at 17:47, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, Feb 10, 2010 at 6:02 AM, Robert Kern robert.k...@gmail.com wrote

Re: [Numpy-discussion] lib.recfunctions: which version? (was Re: Emulate left outer join?)

2010-02-10 Thread Robert Kern
On Wed, Feb 10, 2010 at 15:57, David Carmean d...@halibut.com wrote: On Tue, Feb 09, 2010 at 04:49:30PM -0600, John Hunter wrote: On Tue, Feb 9, 2010 at 4:43 PM, Fernando Perez fperez@gmail.com wrote: On Tue, Feb 9, 2010 at 5:02 PM, Robert Kern robert.k...@gmail.com wrote

Re: [Numpy-discussion] Determine if two arrays share references

2010-02-10 Thread Robert Kern
is x[::2] and x[1::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 truth. -- Umberto Eco ___ NumPy-Discussion

Re: [Numpy-discussion] Scalar-ndarray arguments passed to not_equal

2010-02-11 Thread Robert Kern
(**old_ops) with numpy_ops(multiply=...): print np.array([1, 2, 3]) * np.array([1, 2, 3]) -- 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] Scalar-ndarray arguments passed to not_equal

2010-02-11 Thread Robert Kern
-written generators into full context managers. http://docs.python.org/library/contextlib#contextlib.contextmanager -- 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] Removing datetime support for 1.4.x series ?

2010-02-11 Thread Robert Kern
On Thu, Feb 11, 2010 at 18:23, Charles R Harris charlesr.har...@gmail.com wrote: What about python version? Do we want to bump that up from 2.4? Only if it were *really* necessary for the Python 3 port. Otherwise, I would resist the urge. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-11 Thread Robert Kern
On Thu, Feb 11, 2010 at 18:46, Christopher Barker chris.bar...@noaa.gov wrote: One question: Does anyone think it's a good idea to provide any support for numpy version selection, similar to wxPython's wxversion? -1. It complicates packaging and distribution substantially. -- Robert Kern I

Re: [Numpy-discussion] Re ading scientific notation using D instead of E

2010-02-12 Thread Robert Kern
, strtod() will parse the D correctly. On OS X, for example, it doesn't. It has nothing to do with Python versions but rather the platform that you are on. -- 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] Re ading scientific notation using D instead of E

2010-02-12 Thread Robert Kern
On Fri, Feb 12, 2010 at 11:27, Christopher Barker chris.bar...@noaa.gov wrote: Robert Kern wrote: numpy.float is indeed Python's builtin float type (for obscure historical reasons that I won't go into). However, in Python 2.5, at least, the parsing of the string is offloaded to the standard C

Re: [Numpy-discussion] docstring suggestions

2010-02-12 Thread Robert Kern
, whereas anyone who is working on the docstrings is - hopefully - subscribed to scipy-dev); thanks. numpy docstrings get discussed on numpy-discussion. -- 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] docstring suggestions

2010-02-12 Thread Robert Kern
On Fri, Feb 12, 2010 at 14:26, David Goldsmith d.l.goldsm...@gmail.com wrote: On Fri, Feb 12, 2010 at 10:57 AM, Robert Kern robert.k...@gmail.com wrote: On Fri, Feb 12, 2010 at 12:19, David Goldsmith d.l.goldsm...@gmail.com wrote: PS: please, if you don't mind, in the future post docstring

Re: [Numpy-discussion] docstring suggestions

2010-02-12 Thread Robert Kern
On Fri, Feb 12, 2010 at 14:42, josef.p...@gmail.com wrote: On Fri, Feb 12, 2010 at 3:29 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Feb 12, 2010 at 14:26, David Goldsmith d.l.goldsm...@gmail.com wrote: On Fri, Feb 12, 2010 at 10:57 AM, Robert Kern robert.k...@gmail.com wrote

Re: [Numpy-discussion] docstring suggestions

2010-02-12 Thread Robert Kern
On Fri, Feb 12, 2010 at 14:58, josef.p...@gmail.com wrote: On Fri, Feb 12, 2010 at 3:47 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Feb 12, 2010 at 14:42,  josef.p...@gmail.com wrote: On Fri, Feb 12, 2010 at 3:29 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, Feb 12, 2010 at 14

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-14 Thread Robert Kern
On Sun, Feb 14, 2010 at 17:38, Xavier Gnata xavier.gn...@gmail.com wrote: BTW, is there a better place to discuss these python3 only related issues? I suggest starting a new thread, but numpy-discussion is the right place. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-15 Thread Robert Kern
that. For people who do C++, that's the same problem as changing a base class, which always break the ABI, Actually, it's PyArray_Descr, which corresponds to numpy.dtype, that has been extended. That has even fewer possible use cases for subtyping. I know of none. -- Robert Kern I have come to believe

Re: [Numpy-discussion] Extract subset from an array

2010-02-16 Thread Robert Kern
) (array[:,0]x_max) (array[:,1]y_min) (array[:,1]y_max) # Extract the subset subset = array[condition] Are there any faster solution? That's about as good as it gets. -- 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] create dll from numpy code

2010-02-16 Thread Robert Kern
On Tue, Feb 16, 2010 at 02:07, markus.proel...@ifm.com wrote: Hello, is there a possibility to create a dll from a numpy code? Not really, no. -- 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] ndarray of complex-like data

2010-02-16 Thread Robert Kern
? I strongly recommend simply implementing an arg() function that works on both arrays and and complex objects. Then just use abs() and arg() instead of trying to get instances of your class and using their attributes. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] ndarray of complex-like data

2010-02-17 Thread Robert Kern
On Wed, Feb 17, 2010 at 02:43, Brecht Machiels brecht.machi...@esat.kuleuven.be wrote: Robert Kern wrote: 2) Subclass the ndarray to do what you want. I have subclassed ndarray, but I'm not sure how to continue from there. I was thinking of overriding __getitem__ and casting the complex to my

Re: [Numpy-discussion] f2py: variable number of arguments of variable lengths

2010-02-17 Thread Robert Kern
the lengths of each array - np: the sum of lengths - X : a 1d-array (dimension np) containing the concatenated arrays. Yeah, that's pretty much what you would have to do. -- 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] f2py: variable number of arguments of variable lengths

2010-02-17 Thread Robert Kern
On Wed, Feb 17, 2010 at 15:55, Fabrice Silva si...@lma.cnrs-mrs.fr wrote: Le mercredi 17 février 2010 à 15:43 -0600, Robert Kern a écrit : On Wed, Feb 17, 2010 at 15:29, Fabrice Silva si...@lma.cnrs-mrs.fr wrote: I previously coded a fortran function that needs a variable number of scalar

Re: [Numpy-discussion] Numpy headers

2010-02-18 Thread Robert Kern
the main numpy headers are installed. We greatly prefer that you leave the numpy package intact in order to reduce the number of different configurations out there and to ensure that your users have a completely functional numpy installation. -- Robert Kern I have come to believe that the whole

Re: [Numpy-discussion] Numpy headers

2010-02-19 Thread Robert Kern
to thank you for coming to the list and asking instead of making changes without input. Most distro maintainers of numpy never make an appearance on the list, but we have to field the bug reports of the users of their broken packages regardless. -- Robert Kern I have come to believe

Re: [Numpy-discussion] ask.scipy.org

2010-02-21 Thread Robert Kern
On Sun, Feb 21, 2010 at 16:00, Gökhan Sever gokhanse...@gmail.com wrote: Hello, Since after Robert Kern showed http://advice.mechanicalkern.com/ on SciPy09 there are many similar initiatives that uses stackoverflow.com (SO) layout. Some smart guys come up with this site http

Re: [Numpy-discussion] datetime uses API deprecated in python3.1

2010-02-22 Thread Robert Kern
of PyCObjects. Why? PyCObjects don't serialize at all. They would never show up in a pickle to begin with. -- 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] int-ifying a float array

2010-02-22 Thread Robert Kern
= N.array([0.0, 1.0]); t.dtype dtype('float64') t = N.array(t, dtype=int); t; t.dtype array([0, 1]) dtype('int32') t.astype(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

Re: [Numpy-discussion] random.uniform documentation bug?

2010-02-23 Thread Robert Kern
should address the high low case in the documentation because we're not going to bother raising an exception when high low. -- 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] random.uniform documentation bug?

2010-02-23 Thread Robert Kern
On Tue, Feb 23, 2010 at 13:05, David Goldsmith d.l.goldsm...@gmail.com wrote: On Tue, Feb 23, 2010 at 10:29 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, Feb 23, 2010 at 08:21, Alan G Isaac ais...@american.edu wrote: This behavior does not match the current documentation

Re: [Numpy-discussion] distutils problem with NumPy-1.4 Py-2.7a3 (Snow Leopard)

2010-02-23 Thread Robert Kern
versions (both location and call). sysconfig was deemed useful outside of distutils and was promoted to the top level. Unfortunately, they didn't leave a backwards compatibility stub. Feel free to create a bug ticket on the Python bug tracker. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] random.uniform documentation bug?

2010-02-23 Thread Robert Kern
to pass in a high low, let 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 an underlying truth. -- Umberto Eco ___ NumPy

Re: [Numpy-discussion] random.uniform documentation bug?

2010-02-23 Thread Robert Kern
) as in the standard library. The necessity for a backwards compatibility hack imposes additional costs to making any such change. I don't think those costs are warranted by the semantic confusion of allowing high low. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] random.uniform documentation bug?

2010-02-23 Thread Robert Kern
On Tue, Feb 23, 2010 at 14:51, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/2/23 Robert Kern robert.k...@gmail.com: It helps a little, I agree, but not as much as simply changing the names to something neutral like (a, b) as in the standard library. The necessity for a backwards

Re: [Numpy-discussion] distutils problem with NumPy-1.4 Py-2.7a3 (Snow Leopard)

2010-02-23 Thread Robert Kern
/numpy/distutils/ccompiler.py, line 17, in module    _old_init_posix = distutils.sysconfig._init_posix AttributeError: 'module' object has no attribute '_init_posix' This line is actually unused. You may delete it. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] How to test f2py?

2010-02-23 Thread Robert Kern
On Tue, Feb 23, 2010 at 21:14, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've made PyCObject - PyCapsule changes to f2py for python3.1. How can I check that f2py still works as advertised before making a commit? numpy/f2py/tests/run_all.py -- Robert Kern I have come

Re: [Numpy-discussion] How to test f2py?

2010-02-23 Thread Robert Kern
On Tue, Feb 23, 2010 at 21:51, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Feb 23, 2010 at 8:31 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Feb 23, 2010 at 21:14, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've made PyCObject - PyCapsule changes

Re: [Numpy-discussion] How to test f2py?

2010-02-23 Thread Robert Kern
On Tue, Feb 23, 2010 at 22:12, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Feb 23, 2010 at 8:54 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Feb 23, 2010 at 21:51, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Feb 23, 2010 at 8:31 PM, Robert Kern robert.k

Re: [Numpy-discussion] Numpy array performance issue

2010-02-24 Thread Robert Kern
be: def test2(arrx): return (arrx = 10).sum() -- 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 array performance issue

2010-02-24 Thread Robert Kern
of 3: 103 us per loop 10 loops, best of 3: 17.6 us 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] Numpy array performance issue

2010-02-24 Thread Robert Kern
On Wed, Feb 24, 2010 at 10:40, Bruno Santos bacmsan...@gmail.com wrote: Funny. Which version of python are you using? Python 2.5.4 on OS X. -- 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

Re: [Numpy-discussion] Numpy array performance issue

2010-02-24 Thread Robert Kern
) lsPhasedValues = (aLoci[j_nSize] = 0).sum() ... q = (aLoci[j_nSize] = r).sum() k = (aLoci = r).sum() -- 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] Want cumsum-like function

2010-02-24 Thread Robert Kern
that is like [0,4,7,8]. I don't understand what process would give you [0, 4, 7, 8] rather than [0, 4, 7, 10]. Can you explain a bit 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

Re: [Numpy-discussion] Want cumsum-like function

2010-02-24 Thread Robert Kern
On Wed, Feb 24, 2010 at 23:03, Peter Shinners p...@shinners.org wrote: On 02/24/2010 09:00 PM, Robert Kern wrote: On Wed, Feb 24, 2010 at 22:53, Peter Shinnersp...@shinners.org  wrote: I want a function that works like cumsum, but starts at zero, instead of starting with the first actual

Re: [Numpy-discussion] Numpy array performance issue

2010-02-25 Thread Robert Kern
that sentence means. Please show us some complete code that gives you a result that you do not expect and show us the result that you do expect. -- 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

Re: [Numpy-discussion] Numpy array performance issue

2010-02-25 Thread Robert Kern
was able to get the same result after a while: aAux =aLoci[index_nSize] lsPhasedValues = numpy.unique1d(aAux[numpy.where(aAux0)[0]]) I couldn't came up with a better solution. You don't need the where(). lsPhasedValues = numpy.unique1d(aAux[aAux 0]) -- Robert Kern I have come to believe

Re: [Numpy-discussion] How to test f2py?

2010-02-26 Thread Robert Kern
in the C API like how to pass the length of a character string are not standardized and are sometimes passed by value. -- 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/unpickling numpy.void and numpy.record for multiprocessing

2010-02-26 Thread Robert Kern
the GIL. Pickling of complete arrays works. A quick workaround would be to send rank-0 scalars: Pool.map(map(np.asarray, x)) Or just tuples: Pool.map(map(tuple, x)) -- 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] setting decimal accuracy in array operations (scikits.timeseries)

2010-03-03 Thread Robert Kern
the covers. Use numpy.set_printoptions(precision=16) to see all of them. If you are still seeing actual calculation differences, we will need to see a complete, self-contained example that demonstrates the difference. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] dtype for a single char

2010-03-03 Thread Robert Kern
' can be used on their own. is there a reason for this? Other types have a sensible default determined by the platform. -- 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] setting decimal accuracy in array operations (scikits.timeseries)

2010-03-03 Thread Robert Kern
seeing the effect of the different printing that I described. These are not differences in the actual values. -- 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] Recommendation on reference software [Re: setting decimal accuracy ... ]

2010-03-03 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

Re: [Numpy-discussion] dtype for a single char

2010-03-04 Thread Robert Kern
On Thu, Mar 4, 2010 at 02:34, sam tygier samtyg...@yahoo.co.uk wrote: Robert Kern wrote: On Wed, Mar 3, 2010 at 15:14, sam tygier samtyg...@yahoo.co.uk wrote: Hello today i was caught out by trying to use 'a' as a dtype for a single character. a simple example would be: array([('a',1),('b

Re: [Numpy-discussion] memory usage of numpy arrays

2010-03-04 Thread Robert Kern
binaries from (the URL to the package itself is necessary). Thanks. -- 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] Loading bit strings

2010-03-05 Thread Robert Kern
with: A = fromstring(s, dtype=uint8) out = empty(A.size * 8, dtype=bool) for bit in range(0,8):  out[bit::8] = A(1bit) I just can't shake the feeling that there may be a better way to do this, though... For short enough strings, it probably doesn't really matter. Any correct way will do. -- Robert Kern I

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