Re: [Numpy-discussion] creation of ndarray with dtype=np.object : bug?

2014-12-03 Thread Emanuele Olivetti
0, 1]), np.array([0, 1])], dtype=object) >>> b.shape (2, 2) because it is clear that I meant a list of two vectors, i.e. an array of shape (2,), and not a 2D array of shape (2, 2). Best, Emanuele ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] creation of ndarray with dtype=np.object : bug?

2014-12-03 Thread Emanuele Olivetti
On 12/03/2014 04:32 AM, Ryan Nelson wrote: > Emanuele, > > This doesn't address your question directly. However, I wonder if you > could approach this problem from a different way to get what you want. > > First of all, create a "index" array and then just vs

[Numpy-discussion] creation of ndarray with dtype=np.object : bug?

2014-12-02 Thread Emanuele Olivetti
nnot find a way to create data3 with shape (2,)... How should I address this issue? To me, it looks like a bug in the excellent NumPy. Best, Emanuele ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] np.array creation: unexpected behaviour

2014-01-24 Thread Emanuele Olivetti
c_no_dtype = np.array([a, c]) ValueError: setting an array element with a sequence. The result for 'ab' is what I expect. The one for 'ac' is a bit surprising. The one for ac_no_dtype even is more surprising. Is this an expect

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Emanuele Olivetti
Interesting. Anyone able to reproduce what I observe? Emanuele On 05/24/2013 02:09 PM, Nicolas Rougier wrote: > > > Works for me (numpy 1.7.1, osx 10.8.3): > >>>> import numpy as np >>>> print np.random.multivariate_normal(mean=np.zeros(2), cov=np.e

[Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Emanuele Olivetti
look to the tracker but haven't found any mention of this issue. It might be already solved in the current NumPy (v1.7.0)... or not. I'd like to have your feedback before submitting this issue to the bug tracking system. Best, Emanuele

Re: [Numpy-discussion] [SciPy-user] LARS algorithm

2009-04-10 Thread emanuele
Per Sedeberg wrapped LARS (through RPy) in PyMVPA. Later he mentioned about a C implementation he found and it seems he's going to work on it: http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2009q1/000404.html I guess you should contact him. Emanuele On Fri, April 10, 2009

[Numpy-discussion] [Fwd: Fwd: [ML-news] Call for Submissions: Workshop on Machine Learning Open Source Software (MLOSS), NIPS*08]

2008-09-09 Thread Emanuele Olivetti
Maybe of interest. E. Original Message -- Forwarded message -- From: mikiobraun <[EMAIL PROTECTED]> Date: 2008/9/8 Subject: [ML-news] Call for Submissions: Workshop on Machine Learning Open Source Software (MLOSS), NIPS*08 To: Machine Learning News <[EMAIL PROT

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-08 Thread Emanuele Olivetti
Damian Eads wrote: > Emanuele Olivetti wrote: >> ... >> [*] : ||x - x'||_w = (\sum_{i=1...N} (w_i*|x_i - x'_i|)**p)**(1/p) > > This feature could be implemented easily. However, I must admit I'm not > very familiar with weighted p-norms. What is the reas

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-07 Thread Emanuele Olivetti
Excellent. David said that distance computation will be moved in a separate package soon. I guess that your implementation will be the suitable one for this package. Am I wrong? Thanks again, Emanuele Damian Eads wrote: > Hi there, > > The pdist function computes pairwise distance

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-03 Thread Emanuele Olivetti
to this list when distance will be moved. Thanks, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-03 Thread Emanuele Olivetti
David Cournapeau wrote: > Emanuele Olivetti wrote: >> Hi, >> >> I'm trying to compute the distance matrix (weighted p-norm [*]) >> between two sets of vectors (data1 and data2). Example: >> > > You may want to look at scipy.cluster.distance, which has

[Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-02 Thread Emanuele Olivetti
s really annoying. Thanks, Emanuele [*] : ||x - x'||_w = (\sum_{i=1...N} (w_i*|x_i - x'_i|)**p)**(1/p) ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Emanuele Olivetti
For size1=size2=dimensions=1000 requires ~0.6sec. to compute on my dual core duo. It is 2 order of magnitude faster than my previous solution, but 1-2 order of magnitude slower than using C with weave.inline. Definitely good enough for me. Emanuele

Re: [Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Emanuele Olivetti
Matthieu Brucher wrote: > Hi, > > Bill Baxter proposed a version of this problem some months ago on this > ML. I use it regularly and it is fast enough for me. > Excellent. Exactly what I was looking for. Thanks, Emanuele ___ Numpy-dis

[Numpy-discussion] distance_matrix: how to speed up?

2008-05-21 Thread Emanuele Olivetti
ires just the memory to store the result. But I'd prefer not using C or weave if possible. Thanks in advance for any help, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-23 Thread Emanuele Olivetti
.0%) 0.0186ms ( 57.3%) 0.0226ms ( 69.6%) 10 0.2840ms (100.0%) 0.1171ms ( 41.2%) 0.0939ms ( 33.1%) 100 4.4034ms (100.0%) 4.3657ms ( 99.1%) 4.0465ms ( 91.9%) 1000 44.4854ms (100.0%) 43.9502ms ( 98.8%)

[Numpy-discussion] numpy.ndarray constructor from python list: bug?

2008-03-06 Thread Emanuele Olivetti
a bug? Details: numpy 1.04 on ubuntu linux x86_64 Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy, "H", and struct: numpy bug?

2008-03-04 Thread Emanuele Olivetti
b=struct.pack("<10H",*a) File "/usr/lib/python2.5/struct.py", line 63, in pack return o.pack(*args) SystemError: ../Objects/longobject.c:322: bad argument to internal function No error with python2.4 so I believe it is a 32bit issue. HTH, Emanuele Emanuele Oli

[Numpy-discussion] numpy, "H", and struct: numpy bug?

2008-03-04 Thread Emanuele Olivetti
me little test _without_ numpy and the struct module seems not having problems. Is this a numpy bug? Note: If you remove "<" from the struct format string then it seems to work ok. Regards, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] ERROR in installation of NumPy

2007-10-05 Thread Emanuele Olivetti
As the error message says, you have to free some space in the partition where /tmp is. Your disk (or partition) is full and intermediate/temporary files - needed by the installation step - cannot be created. That's why installation fails. Cheers, Emanuele __

[Numpy-discussion] why std() eats much memory in multidimensional case?

2007-04-20 Thread Emanuele Olivetti
of ram to compute std(3) only. Note that quite all this memory is immediately released after computing std() so it seems it's used just internally and not to represent/store the result. Unfortunately I haven't all that RAM... Could someone explain/correct this problem

Re: [Numpy-discussion] histogram2d bug?

2007-04-19 Thread Emanuele Olivetti
David Huard wrote: > Hi Emanuele, > > The bug is due to a part of the code that shifts the last bin's > position to make sure the array's maximum value is counted in the last > bin, and not as an outlier. To do so, the code computes an approximate > precision used the

Re: [Numpy-discussion] histogram2d bug?

2007-04-19 Thread Emanuele Olivetti
An even simpler example generating the same error: import numpy x = numpy.array([0,0]) numpy.histogram2d(x,x) HTH, Emanuele Emanuele Olivetti wrote: > While using histogram2d on simple examples I got these errors: > > import numpy > x = numpy.array([0,0]) > y = n

[Numpy-discussion] histogram2d bug?

2007-04-19 Thread Emanuele Olivetti
691 around = round_ OverflowError: long int too large to convert to int - numpy.__version__ '1.0.3.dev3719' Hope this report helps, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] numpy.random.permutation bug?

2007-01-18 Thread Emanuele Olivetti
Robert Kern wrote: > Emanuele Olivetti wrote: > > >> permutation() likes 'int' and dislikes 'numpy.int32' integers :( >> Seems a bug. >> > > Yup. I should get around to fixing it later tonight. > > Wow. Superfast! :) Eman

[Numpy-discussion] numpy.random.permutation bug?

2007-01-18 Thread Emanuele Olivetti
dislikes 'numpy.int32' integers :( Seems a bug. HTH, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1

2006-12-08 Thread Emanuele Olivetti
o be saved). > Thank you for the detailed explanation. I can easily upgrade the central host that collects results from other hosts in order to be able to read all results (1.0 or 1.0.1). Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy

Re: [Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1

2006-12-07 Thread emanuele
lf and tell me if it works for you. Thanks, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] pickling arrays: numpy 1.0 can't unpickle numpy 1.0.1

2006-12-07 Thread Emanuele Olivetti
e.py", line 1217, in load_build setstate(state) TypeError: argument 1 must be sequence of length 5, not 8 - How can I let access pickled arrays made in numpy 1.0.1 to numpy 1.0 ? Help! Thanks in advance, Emanuele ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion