Re: [Numpy-discussion] Sampling from the multivariate normal

2011-11-09 Thread Robert Kern
]]) [~] |26 samples = np.random.multivariate_normal(means, cov, 1) [~] |27 cov array([[ 100., 221.35943621], [ 221.35943621, 1000.]]) [~] |28 np.cov(samples.T) array([[ 101.16844481, 222.00301056], [ 222.00301056, 1001.58403922]]) -- Robert Kern I have come

Re: [Numpy-discussion] Rebinning numpy array

2011-11-13 Thread Robert Kern
is in your getx() and gety() methods. If so, then I think you are on the right track. If you still have problems, then we might need to see some of the problematic data and results. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Rebinning numpy array

2011-11-13 Thread Robert Kern
, but it may be more appropriate. No, you do want to compute the interpolated values at the boundaries of the new bins. Then differencing the values at the boundaries will give you the correct values for the mass between the bounds. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] numpy.int32 is not subclass of int, but numpy.int64 is

2011-11-14 Thread Robert Kern
inheritance tree. On platforms where the Python int type is 32-bit, numpy.int32 will include it instead. -- 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] Memory hungry reduce ops in Numpy

2011-11-15 Thread Robert Kern
algorithm. It's just work, as you know given your contributions to other project. Actually, last time I suggested it, it was brought up that the online algorithms can be worse numerically. I'll try to find the thread. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] BSD C port of FFTPACK incl. bluestein algorithm

2011-11-18 Thread Robert Kern
that since the cost of maintaining the build configuration for all of those different backends was so high. It's worth noting that numpy.fft is already using a C translation of FFTPACK. I'm not sure what the differences are between this translation and Martin's. -- Robert Kern I have come to believe

Re: [Numpy-discussion] magma?

2011-11-18 Thread Robert Kern
these routines with functions signature-compatible with those in numpy.linalg. -- 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 automatically all the parameters from a file

2011-11-30 Thread Robert Kern
a hierarchical object will all of the parameters as attributes. -- 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] who owns the data?

2011-11-30 Thread Robert Kern
.view(dt). The same kind of checking goes on in both places. -- 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] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
interpreters for extension modules. Many extension modules happen to work in this environment, but numpy is not one of them. We have some global state that we need to keep, and this gets interfered with in a multiple interpreter environment. -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Fri, Dec 9, 2011 at 11:00, Yang Zhang yanghates...@gmail.com wrote: Thanks for the clarification.  Alas.  So is there no simple workaround to making numpy work in environments such as Jepp? I don't think so, no. -- Robert Kern I have come to believe that the whole world is an enigma

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Fri, Dec 9, 2011 at 13:18, Pierre Haessig pierre.haes...@crans.org wrote: Le 09/12/2011 09:31, Robert Kern a écrit : We have some global state that we need to keep, and this gets interfered with in a multiple interpreter environment. I recently got interested in multiprocessing computation

Re: [Numpy-discussion] Array min from argmin along an axis?

2011-12-13 Thread Robert Kern
, axis=0) [~] |5 y[i, np.arange(y.shape[1])] array([0, 0, 0, 0, 0]) [~] |6 y[np.argmin(y, axis=0), np.arange(y.shape[1])] array([0, 0, 0, 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

Re: [Numpy-discussion] Owndata flag

2011-12-15 Thread Robert Kern
if it causes bad interactions with the garbage collector, say (though hiding information from the GC seems like a suboptimal approach). -- 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] import_array weird behavior

2011-12-20 Thread Robert Kern
can *mostly* tell from context whether to resolve NPY.whatever from either the C side or the Python side, but sometimes it's ambiguous. It's more often ambiguous to the human reader, too, so I try to be explicit about it. I don't really know why the tutorials do it the confusing way. -- Robert

Re: [Numpy-discussion] numpy1.6.1 install fortran compiler error

2011-12-20 Thread Robert Kern
if you think the discovered configuration is incorrect somehow. A failure here only means that your system does not provide what is being tested for. -- 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] dtype comparison, hash

2011-12-27 Thread Robert Kern
is obeyed. This is a useful domain that is used internally in numpy. Is this the problem that you found? -- 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] Functions vs Methods

2011-12-28 Thread Robert Kern
that you can. -- 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] Mersenne Twister: Python vs. NumPy

2011-12-30 Thread Robert Kern
() and np.random.RandomState.get_state() and their associated setter functions. You really just need to reformat the information to be acceptable to the other. -- 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 comparison, hash

2011-12-30 Thread Robert Kern
On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner li...@informa.tiker.net wrote: Hi Robert, On Tue, 27 Dec 2011 10:17:41 +, Robert Kern robert.k...@gmail.com wrote: On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner li...@informa.tiker.net wrote: Hi all, Two questions: - Are dtypes

Re: [Numpy-discussion] choose - segfault

2012-01-03 Thread Robert Kern
dumped) Can you provide an example that replicates the crash? Since it looks like you have a core dump handy, can you get a gdb backtrace to show us where the crash is? Platform details would also be handy. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless

Re: [Numpy-discussion] Improving Python+MPI import performance

2012-01-13 Thread Robert Kern
On Fri, Jan 13, 2012 at 21:42, Sturla Molden stu...@molden.no wrote: Den 13.01.2012 22:24, skrev Robert Kern: Do these systems have a ramdisk capability? I assume you have seen this as well :) http://www.cs.uoregon.edu/Research/paracomp/papers/iccs11/iccs_paper_final.pdf I hadn't, actually

Re: [Numpy-discussion] Loading a Quicktime moive (*.mov) as series of arrays

2012-01-15 Thread Robert Kern
this on Mac OS X with QuickTime support. Is this the best bet? I've had luck with pyffmpeg, though I haven't tried QuickTime .mov files: http://code.google.com/p/pyffmpeg/ -- 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] dtype comparison, hash

2012-01-17 Thread Robert Kern
On Tue, Jan 17, 2012 at 05:11, Andreas Kloeckner li...@informa.tiker.net wrote: Hi Robert, On Fri, 30 Dec 2011 20:05:14 +, Robert Kern robert.k...@gmail.com wrote: On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner li...@informa.tiker.net wrote: Hi Robert, On Tue, 27 Dec 2011 10:17:41

Re: [Numpy-discussion] Loading a Quicktime moive (*.mov) as series of arrays

2012-01-18 Thread Robert Kern
On Wed, Jan 18, 2012 at 10:19, Peter numpy-discuss...@maubp.freeserve.co.uk wrote: Sending this again (sorry Robert, this will be the second time for you) since I sent from a non-subscribed email address the first time. On Sun, Jan 15, 2012 at 7:12 PM, Robert Kern wrote: On Sun, Jan 15, 2012

Re: [Numpy-discussion] Reference count error detected bug appears with multithreading (OpenMP TBB)

2012-01-18 Thread Robert Kern
the backtrace where your code starts to verify if this looks to be the 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 an underlying truth.   -- Umberto Eco

Re: [Numpy-discussion] Reference count error detected bug appears with multithreading (OpenMP TBB)

2012-01-18 Thread Robert Kern
, rather than the associated datatype descriptor - I assume I want to pay attention to the (self=0x117e0e850) in this line, and that is the address of the array I am mishandling? #1  0x000102897fc4 in array_dealloc (self=0x117e0e850) at arrayobject.c:271 Yes. -- Robert Kern I have come

Re: [Numpy-discussion] advanced indexing bug with huge arrays?

2012-01-24 Thread Robert Kern
, please, fix whatever you can. -- 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] advanced indexing bug with huge arrays?

2012-01-24 Thread Robert Kern
, what are you demonstrating there? -- 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] advanced indexing bug with huge arrays?

2012-01-24 Thread Robert Kern
On Tue, Jan 24, 2012 at 09:19, Sturla Molden stu...@molden.no wrote: On 24.01.2012 10:16, Robert Kern wrote: I'm sorry, what are you demonstrating there? Both npy_intp and C long are used for sizes and indexing. Ah, yes. I think Travis added the multiiter code to cont1_array(), which does

Re: [Numpy-discussion] Permuting sparse arrays

2012-01-25 Thread Robert Kern
() [~/scratch] |41 p array([2, 3, 5, 4, 6, 1, 0]) [~/scratch] |42 ps array([6, 5, 0, 1, 3, 2, 4]) [~/scratch] |43 ps[loi] array([5, 2, 4]) -- 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] preferred way of testing empty arrays

2012-01-27 Thread Robert Kern
, None) in the same way. Usually, it's a bad idea to conflate the three. -- 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] bug in array instanciation?

2012-01-27 Thread Robert Kern
', '|S40'), ('start', 'f8'), ('stop', 'f8'), ('mode', '|S10')]) -- 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 all unexpected result (generator)

2012-01-31 Thread Robert Kern
. asarray() and array() can't do it in general because they need to autodiscover the shape and dtype all at the same time. -- 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] numpy all unexpected result (generator)

2012-01-31 Thread Robert Kern
object genexpr at 0xdc24a08, dtype=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

Re: [Numpy-discussion] numpy all unexpected result (generator)

2012-01-31 Thread Robert Kern
On Tue, Jan 31, 2012 at 15:35, Benjamin Root ben.r...@ou.edu wrote: On Tue, Jan 31, 2012 at 9:18 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jan 31, 2012 at 15:13, Benjamin Root ben.r...@ou.edu wrote: Is np.all() using np.array() or np.asanyarray()?  If the latter, I would

Re: [Numpy-discussion] numpy all unexpected result (generator)

2012-01-31 Thread Robert Kern
additional feature of np.asanyarray() is that is does not convert ndarray subclasses like matrix to ndarray objects. np.asanyarray() does not accept more types of objects than np.asarray(). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: [Numpy-discussion] numpy all unexpected result (generator)

2012-01-31 Thread Robert Kern
at least. I would rather we deprecate the all() and any() functions in favor of the alltrue() and sometrue() aliases that date back to Numeric. Renaming them to match the builtin names was a mistake. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Logical indexing and higher-dimensional arrays.

2012-02-08 Thread Robert Kern
. That would be a useful change. We could start with a warning. See how many people kvetch about it. I don't like removing long-standing, documented features based on suspicions that their user base is small. Our suspicions and intuitions about such things aren't worth much. -- Robert Kern I have come

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Robert Kern
to go through these curves to find the locations of self-intersection and remove the parts of the segments and arcs that are too close to the reference curve. This is tricky to do, but the formulae for segment-segment, segment-arc, and arc-arc intersection can be found online. -- Robert Kern I have

Re: [Numpy-discussion] _import_array()

2012-02-14 Thread Robert Kern
Numpy-using operations. http://docs.scipy.org/doc/numpy/reference/c-api.array.html#import_array Rather, it must be called once in the initialization routine of each extension module that uses numpy. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] Index Array Performance

2012-02-14 Thread Robert Kern
has repetitions. Each one of these copies gets incremented by 1, then the __setitem__() will apply each of those in turn to the appropriate cell in hist, each one simply overwriting the previous one. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: [Numpy-discussion] repeat array along new axis without making a copy

2012-02-15 Thread Robert Kern
it up into a utility function, it works great. -- 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] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread Robert Kern
space, but are otherwise multivariate-normally-distributed in that subspace. I'm not too attached to the semantics. We should check that the Cholesky decomposition is stable before switching, though. The eigenvalue algorithm probably suffers from instability just as much as the SVD one. -- Robert

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread Robert Kern
On Thu, Feb 16, 2012 at 17:07, josef.p...@gmail.com wrote: cholesky is also deterministic in my runs We will need to check a variety of builds with different LAPACK libraries and also different matrix sizes to be sure. Alas! -- Robert Kern I have come to believe that the whole world

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-18 Thread Robert Kern
they manage to do this is by scrupulously avoiding exceptions even in the internal, never-touches-C zone. -- 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] Proposed Roadmap Overview

2012-02-18 Thread Robert Kern
was being discussed was putting the core in C and using Cython to wrap it was simply a non-sequitur. Discussion of alternatives is fine. You weren't doing that. -- 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] Proposed Roadmap Overview

2012-02-18 Thread Robert Kern
On Sat, Feb 18, 2012 at 22:06, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Feb 18, 2012 at 2:03 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Feb 18, 2012 at 21:51, Matthew Brett matthew.br...@gmail.com wrote: On Sat, Feb 18, 2012 at 1:40 PM, Charles R Harris charlesr.har

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-18 Thread Robert Kern
On Sat, Feb 18, 2012 at 22:29, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Feb 18, 2012 at 2:20 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Feb 18, 2012 at 22:06, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Feb 18, 2012 at 2:03 PM, Robert Kern robert.k

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Robert Kern
something that is widely used enough as a building block for other things. -- 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] Possible roadmap addendum: building better text file readers

2012-02-23 Thread Robert Kern
in Python, this is _not good_. But why, oh why, are people storing big data in CSV? Because everyone can read it. It's not so much storage as transmission. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

Re: [Numpy-discussion] numpy uint16 array to unicode string

2012-02-25 Thread Robert Kern
' if they are big-endian. Other chunks are 32bit integers how do I get these chunks into a numpy array of int32? data[start:end].view(np.int32) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] [NumPy-Tickets] [NumPy] #2067: when x is an N-D array, list(x) produces surprising results

2012-02-28 Thread Robert Kern
/mailman/listinfo/numpy-tickets -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Determining the 'viewness' of an array, and flags.owndata confusion

2012-02-28 Thread Robert Kern
or not an array is a view? Your original intuition was correct. It's just that sometimes an operation will make a copy of the input data, but then make a view on that copy. The output object is a view, just not a view on the input object. -- Robert Kern

Re: [Numpy-discussion] Possible roadmap addendum: building better text file readers

2012-02-29 Thread Robert Kern
of the appropriate length and dtype). Then pulling out all of the 'x' field values will only touch a smaller fraction of the file. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] Floating point close function?

2012-03-03 Thread Robert Kern
to do so? As a general design principle, adding a boolean flag that changes the return type is worse than making a new function. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] Floating point close function?

2012-03-03 Thread Robert Kern
On Sat, Mar 3, 2012 at 14:31, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 3, 2012 at 3:05 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Mar 3, 2012 at 13:59, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Thu, Mar 1, 2012 at 11:44 PM, Joe Kington jking

Re: [Numpy-discussion] Floating point close function?

2012-03-03 Thread Robert Kern
On Sat, Mar 3, 2012 at 15:22, Benjamin Root ben.r...@ou.edu wrote: On Saturday, March 3, 2012, Robert Kern robert.k...@gmail.com wrote: On Sat, Mar 3, 2012 at 14:31, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 3, 2012 at 3:05 PM, Robert Kern robert.k...@gmail.com wrote

Re: [Numpy-discussion] Floating point close function?

2012-03-03 Thread Robert Kern
On Sat, Mar 3, 2012 at 14:34, Robert Kern robert.k...@gmail.com wrote: On Sat, Mar 3, 2012 at 14:31, Ralf Gommers ralf.gomm...@googlemail.com wrote: Because this is also bad: np.TAB Display all 561 possibilities? (y or n) Not as bad as overloading np.allclose(x,y,return_array=True

Re: [Numpy-discussion] Floating point close function?

2012-03-03 Thread Robert Kern
On Sat, Mar 3, 2012 at 15:51, Olivier Delalleau sh...@keba.be wrote: Le 3 mars 2012 10:27, Robert Kern robert.k...@gmail.com a écrit : On Sat, Mar 3, 2012 at 14:34, Robert Kern robert.k...@gmail.com wrote: On Sat, Mar 3, 2012 at 14:31, Ralf Gommers ralf.gomm...@googlemail.com wrote

Re: [Numpy-discussion] Floating point close function?

2012-03-03 Thread Robert Kern
On Sat, Mar 3, 2012 at 16:06, Olivier Delalleau sh...@keba.be wrote: Le 3 mars 2012 11:03, Robert Kern robert.k...@gmail.com a écrit : On Sat, Mar 3, 2012 at 15:51, Olivier Delalleau sh...@keba.be wrote: Le 3 mars 2012 10:27, Robert Kern robert.k...@gmail.com a écrit : On Sat, Mar 3, 2012

Re: [Numpy-discussion] Fixing PyArray_Descr flags member size, ABI vs pickling issue

2012-03-06 Thread Robert Kern
. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Fixing PyArray_Descr flags member size, ABI vs pickling issue

2012-03-06 Thread Robert Kern
On Tue, Mar 6, 2012 at 18:25, Travis Oliphant tra...@continuum.io wrote: Why do we want to return a single string char instead of an int? I suspect just to ensure that any provided value fits in the range 0..255. But that's easily done explicitly. -- Robert Kern

Re: [Numpy-discussion] how to check type of array?

2012-03-29 Thread Robert Kern
=='int32'? this and a.dtype=='i4' a.dtype==np.int32 all work. For a more general check (e.g. if it is any type of integer), you can do np.issubclass_(a.dtype.type, np.integer) I don't recommend using that. Use np.issubdtype(a.dtype, np.integer) instead. -- Robert Kern

Re: [Numpy-discussion] Getting C-function pointers from Python to C

2012-04-10 Thread Robert Kern
this is what is envisioned here:             typedef struct {                        PyObject_HEAD                        char *b_ptr;             } _cfuncptr_object; Why not just use PyCapsules? http://docs.python.org/release/2.7/c-api/capsule.html -- Robert Kern

Re: [Numpy-discussion] datetime dtype possible regression

2012-04-27 Thread Robert Kern
' Any hints about a regression I can check for? Or perhaps I missed an api change for specifying datetime dtypes? Judging from the error message, it looks like an intentional API change. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion

Re: [Numpy-discussion] Alternative to R phyper

2012-04-30 Thread Robert Kern
, sorry. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Status of np.bincount

2012-05-03 Thread Robert Kern
is left as an exercise for the reader. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Status of np.bincount

2012-05-03 Thread Robert Kern
On Thu, May 3, 2012 at 2:50 PM, Robert Elsner ml...@re-factory.de wrote: Am 03.05.2012 15:45, schrieb Robert Kern: On Thu, May 3, 2012 at 2:24 PM, Robert Elsner ml...@re-factory.de wrote: Hello Everybody, is there any news on the status of np.bincount with respect to big numbers? It seems I

Re: [Numpy-discussion] Should arr.diagonal() return a copy or a view? (1.7 compatibility issue)

2012-05-16 Thread Robert Kern
the setup.py manages to import. So if you are using virtualenv, just make sure that the virtualenv is activated and python refers to the virtualenv's python executable. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Robert Kern
/. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Scipy build can't find BLAS when using numpy master? (Was: Should arr.diagonal() return a copy or a view? (1.7 compatibility issue))

2012-05-16 Thread Robert Kern
On Wed, May 16, 2012 at 4:35 PM, Nathaniel Smith n...@pobox.com wrote: On Wed, May 16, 2012 at 4:24 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, May 16, 2012 at 4:21 PM, Nathaniel Smith n...@pobox.com wrote: I built some pristine python 2.7 installs from scratch (no virtualenv

Re: [Numpy-discussion] pre-PEP for making creative forking of NumPy less destructive

2012-05-18 Thread Robert Kern
for this style of polymorphism at this level is even rarer. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] un-silencing Numpy's deprecation warnings

2012-05-22 Thread Robert Kern
mostly in true end-user scenarios, e.g. genfromtxt(). But there are many other cases where we should continue to use DeprecationWarning, e.g. _array2string(). But on the whole, I would just leave the DeprecationWarnings as they are. -- Robert Kern

Re: [Numpy-discussion] un-silencing Numpy's deprecation warnings

2012-05-22 Thread Robert Kern
On Tue, May 22, 2012 at 11:14 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 05/22/2012 12:06 PM, Robert Kern wrote: On Tue, May 22, 2012 at 9:27 AM, Nathaniel Smithn...@pobox.com  wrote: So maybe we should change all our DeprecationWarnings into FutureWarnings (or at least

Re: [Numpy-discussion] un-silencing Numpy's deprecation warnings

2012-05-22 Thread Robert Kern
On Tue, May 22, 2012 at 2:45 PM, Nathaniel Smith n...@pobox.com wrote: On Tue, May 22, 2012 at 11:06 AM, Robert Kern robert.k...@gmail.com wrote: On Tue, May 22, 2012 at 9:27 AM, Nathaniel Smith n...@pobox.com wrote: So starting in Python 2.7 and 3.2, the Python developers have made

Re: [Numpy-discussion] question about in-place operations

2012-05-22 Thread Robert Kern
) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] how to avoid re-shaping

2012-05-22 Thread Robert Kern
must iterate manually. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-24 Thread Robert Kern
-stride solution can be found in an open source C++ global array code, IIRC. Double-hmmm...) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-25 Thread Robert Kern
On Thu, May 24, 2012 at 5:52 PM, Robert Kern robert.k...@gmail.com wrote: (Hmm, now that I think about it, the edge cases are when the strides are 0 or negative. 0-stride axes can simply be removed, and I think we should be able to work back to a first item and flip the sign on the negative

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-25 Thread Robert Kern
On Fri, May 25, 2012 at 3:55 PM, Nathaniel Smith n...@pobox.com wrote: On May 25, 2012 2:21 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 24, 2012 at 5:52 PM, Robert Kern robert.k...@gmail.com wrote: (Hmm, now that I think about it, the edge cases are when the strides are 0

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-25 Thread Robert Kern
On Fri, May 25, 2012 at 3:55 PM, Nathaniel Smith n...@pobox.com wrote: On May 25, 2012 2:21 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 24, 2012 at 5:52 PM, Robert Kern robert.k...@gmail.com wrote: (Hmm, now that I think about it, the edge cases are when the strides are 0

Re: [Numpy-discussion] Numpy code in GPL package

2012-05-30 Thread Robert Kern
, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] How to remove any row or column of a numpy matrix whose sum is 3?

2012-06-04 Thread Robert Kern
) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] varargs for logical_or, etc

2012-06-05 Thread Robert Kern
, u/5 == 13)) reduce(np.logical_and, args) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-07 Thread Robert Kern
be desirable for this to return [8, 9, 0, 1] Unfortunately, this would be inconsistent with Python semantics: [~] |1 u = range(10) [~] |2 u[-2:2] [] -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman

Re: [Numpy-discussion] trivial question?

2012-06-20 Thread Robert Kern
On Wed, Jun 20, 2012 at 3:58 PM, Neal Becker ndbeck...@gmail.com wrote: Maybe I'm being slow, but is there any convenient function to calculate, for 2 vectors: \sum_i \sum_j x_i y_j (I had a matrix once, but it vanished without a trace) np.multiply.outer(x, y).sum() -- Robert Kern

Re: [Numpy-discussion] Good way to develop numpy as popular choice!

2012-06-21 Thread Robert Kern
On Thu, Jun 21, 2012 at 7:33 PM, eat e.antero.ta...@gmail.com wrote: Heh, On Thu, Jun 21, 2012 at 6:03 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, Jun 21, 2012 at 3:59 PM, bob tnur bobtnu...@gmail.com wrote: Hi all numpy fun;) This question is already posted in stackoverflow

Re: [Numpy-discussion] Bug in pickling an ndarray?

2012-06-30 Thread Robert Kern
, which it is not when I get the ndarray from a pickle. That is not the way to check if an ndarray owns its data. Instead, check a.flags['OWNDATA'] -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman

Re: [Numpy-discussion] import numpy performance

2012-07-02 Thread Robert Kern
tab-completion setup I have for my regular python terminal.  Of course, in the grand scheme of things, that really isn't all that important, I don't think. We used to do it for scipy. It did interfere with tab completion. It did drive many people nuts. -- Robert Kern

Re: [Numpy-discussion] Type specific sorts: objects, structured arrays, and all that.

2012-07-10 Thread Robert Kern
? You need special handling for NaTs to be consistent with how we deal with NaNs in floats. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] use slicing as argument values?

2012-07-12 Thread Robert Kern
]: b[slice(1)] Out[26]: array([1]) In [27]: b[slice(4)] Out[27]: array([1, 2, 3, 4]) In [28]: b[slice(None,4)] Out[28]: array([1, 2, 3, 4]) so slice(4) is actually slice(None,4), how can I exactly want retrieve a[4] using slice object? You don't. You use 4. -- Robert Kern

Re: [Numpy-discussion] use slicing as argument values?

2012-07-13 Thread Robert Kern
') for a[1:3,:,4] ect. I am very close now. [~] |1 from numpy import index_exp [~] |2 index_exp[1:3,:,2:4] (slice(1, 3, None), slice(None, None, None), slice(2, 4, None)) -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http

Re: [Numpy-discussion] building a numpy egg for centos

2012-07-24 Thread Robert Kern
never work, but python setupegg.py bdist_egg should. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Synonym standards

2012-07-26 Thread Robert Kern
separately is preferred. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

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

2012-07-30 Thread Robert Kern
to have the same shape as `condition` In the example you gave, x was a scalar. net.max() returns an array: print type(net.max()) type 'numpy.float32' No, that's a scalar. The type would be numpy.ndarray if it were an array. -- Robert Kern

Re: [Numpy-discussion] load of custom .npy file fails with numpy 2.0.0

2012-08-02 Thread Robert Kern
with this descr. I feel your pain, Geoff, and I apologize that my lax specification led you down this path, but I think you need to fix your code anyways. -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org

Re: [Numpy-discussion] load of custom .npy file fails with numpy 2.0.0

2012-08-02 Thread Robert Kern
On Thu, Aug 2, 2012 at 11:41 PM, Geoffrey Irving irv...@naml.us wrote: On Thu, Aug 2, 2012 at 1:26 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, Aug 2, 2012 at 8:46 PM, Geoffrey Irving irv...@naml.us wrote: Hello, The attached .npy file was written from custom C++ code. It loads fine

Re: [Numpy-discussion] Licensing question

2012-08-06 Thread Robert Kern
mailing list NumPy-Discussion@scipy.org javascript:; http://mail.scipy.org/mailman/listinfo/numpy-discussion -- Robert Kern ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Licensing question

2012-08-08 Thread Robert Kern
On Wed, Aug 8, 2012 at 10:34 AM, David Cournapeau courn...@gmail.com wrote: On Wed, Aug 8, 2012 at 12:55 AM, Nathaniel Smith n...@pobox.com wrote: On Mon, Aug 6, 2012 at 8:31 PM, Robert Kern robert.k...@gmail.com wrote: Those are not the original Fortran sources. The original Fortran sources

  1   2   3   4   5   6   7   8   9   10   >