[Numpy-discussion] MaskedArray __setitem__ Performance

2008-02-15 Thread Alexander Michael
In part of some code I'm rewriting from carrying around a data and mask array to using MaskedArray, I read data into an array from an input stream. By its nature this a "one at a time" process, so it is basically a loop over assigning single elements (in no predetermined order) of already allocated

[Numpy-discussion] test failures when numpy built without atlas libraries.

2008-02-15 Thread Charles R Harris
When built without ATLAS, the following tests fail : == ERROR: check_testUfuncRegression (numpy.core.tests.test_ma.test_ufuncs) -- Traceback (most recent call las

Re: [Numpy-discussion] import issue with new Python

2008-02-15 Thread Alan G Isaac
On Fri, 15 Feb 2008, Dinesh B Vadhia apparently wrote: > I upgraded to Python 2.5.2c1 today, and got the following error for: >> import numpy >> import scipy > Traceback (most recent call last): > File "C:\ ... .py", line 19, in > import scipy > ImportError: No module named scipy > I'm us

[Numpy-discussion] import issue with new Python

2008-02-15 Thread Dinesh B Vadhia
I upgraded to Python 2.5.2c1 today, and got the following error for: > import numpy > import scipy Traceback (most recent call last): File "C:\ ... .py", line 19, in import scipy ImportError: No module named scipy I'm using Numpy 1.0.4 and Scipy 0.6. Any ideas? Dinesh _

Re: [Numpy-discussion] MaskedArray __setitem__ for Record Values

2008-02-15 Thread Pierre GM
On Friday 15 February 2008 14:41:27 Alexander Michael wrote: > Even better- thanks! You're welcome. > > Mmh. Where should I commit the fix ? Directly to the trunk ? Done. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.sci

Re: [Numpy-discussion] MaskedArray __setitem__ for Record Values

2008-02-15 Thread Alexander Michael
On Fri, Feb 15, 2008 at 12:59 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > Good call. > The easiest is still to replace the line 1361 with: > dval = narray(value, copy=False, dtype=self.dtype) > > The problem with the initial method was that the tuple got transformed into a > (2,) array whose ty

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Alexander Michael
On Fri, Feb 15, 2008 at 11:51 AM, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > Numpy does complain if you attempt to resize an array with views on > it: > > In [8]: x = np.array([1,2,3]) > > In [14]: y = x[::-1] > > In [18]: x.resize((4,)) > ---

Re: [Numpy-discussion] MaskedArray __setitem__ for Record Values

2008-02-15 Thread Pierre GM
On Friday 15 February 2008 10:51:04 Alexander Michael wrote: > >>> d = numpy.empty((5,4), dtype=[('value', float),('source', int)]) > >>> a = ma.MaskedArray(d, mask=True, fill_value=(0.0,0)) > >>> a[0,0] = (10.0, 1) > > numpy\ma\core.py in __setitem__(self, indx, value) >1359 return

Re: [Numpy-discussion] resizing arrays

2008-02-15 Thread Charles R Harris
On Fri, Feb 15, 2008 at 6:49 AM, Neal Becker <[EMAIL PROTECTED]> wrote: > I have a situation where I'm going to save some data sets to plot, but I > don't know a-priori how many sets there will be. I'm using this code: > > try: > shape = list(phase_plots.shape) > shape[0] += 1 > phase_plots.re

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Stefan van der Walt
On Fri, Feb 15, 2008 at 08:28:08AM -0500, Alexander Michael wrote: > On Fri, Feb 15, 2008 at 7:12 AM, Stefan van der Walt <[EMAIL PROTECTED]> > wrote: > > As far as I know, the reference count to the array is increased when > > you create a view, but the views themselves are not tracked anywhere

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread David Cournapeau
On Sat, Feb 16, 2008 at 12:43 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > The MSDN website has some articles about SxS DLLs though. I had to read > about ten articles to get the big picture. The information is scattered > all over the place. :/ 10 pages, xml files and not even compatibl

[Numpy-discussion] MaskedArray __setitem__ for Record Values

2008-02-15 Thread Alexander Michael
I am attempting to work with field dtypes (i.e. record arrays) as MaskedArrays. I don't want to use MaskedRecords because I want the mask to apply to the whole record since the first field is primary and the rest are "tag along" values associated with the primary data value. The numpy.ndarray suppo

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread Christian Heimes
David Cournapeau wrote: > Do you have a link to the related python ML discussion by any chance ? No, I'm sorry. It was a private chat between between Guido, Martin and me during the release phase of Python 3.0a2. The MSDN website has some articles about SxS DLLs though. I had to read about ten ar

Re: [Numpy-discussion] String sort

2008-02-15 Thread Francesc Altet
A Friday 15 February 2008, Charles R Harris escrigué: > On Fri, Feb 15, 2008 at 5:09 AM, Francesc Altet <[EMAIL PROTECTED]> wrote: > > Hi Chuck, > > > > I've given more testing to the new quicksort routines for strings > > in the forthcoming NumPy. I've run the indexing test units in > > PyTables

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Davide Albanese
Ok, sorry! The cost function is embedded into the C smo() function. I think that you cannot access it directly. Matthieu Brucher ha scritto: > Well this is an input parameter, I'd like to access the cost function > directly so that I can use it to follow its gradient to the limit > between the

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Matthieu Brucher
Well this is an input parameter, I'd like to access the cost function directly so that I can use it to follow its gradient to the limit between the two classes. Matthieu 2008/2/15, Davide Albanese <[EMAIL PROTECTED]>: > > Yes: https://mlpy.fbk.eu/wiki/MlpyExamplesWithDoc > > * svm() > Initialize

[Numpy-discussion] resizing arrays

2008-02-15 Thread Neal Becker
I have a situation where I'm going to save some data sets to plot, but I don't know a-priori how many sets there will be. I'm using this code: try: shape = list(phase_plots.shape) shape[0] += 1 phase_plots.resize (shape, refcheck=0) except NameError: phase_plots = empty ((1, 2*iterations+

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Alexander Michael
On Fri, Feb 15, 2008 at 7:12 AM, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > As far as I know, the reference count to the array is increased when > you create a view, but the views themselves are not tracked anywhere. > You can therefore say whether there are references around, but you > c

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread David Cournapeau
Christian Heimes wrote: > > That's not enough for some DLLs. .NET assemblies as well as Side-by-Side > dlls (SxS) must be registered properly. You can install a SxS dll in > PATH but simple copying the DLL isn't enough. It also depends on the OS. Ah, that reminds me of something I tried, that is u

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread Christian Heimes
Matthieu Brucher wrote: > When Visual Studio 2008 will be used, there might be a way of using the > manifest files (that were created for a similar purpose). > For the moment, All I know is that you must put the dll in the > Windows/system32 folder or somewhere in the PATH. That's not enough for s

Re: [Numpy-discussion] String sort

2008-02-15 Thread Charles R Harris
On Fri, Feb 15, 2008 at 5:09 AM, Francesc Altet <[EMAIL PROTECTED]> wrote: > Hi Chuck, > > I've given more testing to the new quicksort routines for strings in the > forthcoming NumPy. I've run the indexing test units in PyTables Pro > (they stress the sorting routines a lot) against the current

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread David Cournapeau
Matthieu Brucher wrote: > When Visual Studio 2008 will be used, there might be a way of using > the manifest files (that were created for a similar purpose). > For the moment, All I know is that you must put the dll in the > Windows/system32 folder or somewhere in the PATH. Do you know where to

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Davide Albanese
Whith "standard" Python: >>> who() Robin ha scritto: > On Thu, Feb 14, 2008 at 8:43 PM, Alexander Michael <[EMAIL PROTECTED]> wrote: > >> Is there a way to list all of the arrays that are referencing a given >> array? Similarly, is there a way to get a list of all arrays that are >> currentl

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread David Cournapeau
Jon Wright wrote: > > Hi, > > To be honest I'd be nervous about spreading your depedencies all over > the disk, the potential interactions go as n^2. Well, I am more than nervous, this is totally insane, and I tried different things (registry: per application path, etc...). But it just looks l

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Davide Albanese
Yes: https://mlpy.fbk.eu/wiki/MlpyExamplesWithDoc * svm() Initialize the svm class. Inputs: ... cost - for cost-sensitive classification [-1.0, 1.0] Matthieu Brucher ha scritto: > OK, I'll try it then :) > > Is there an access to the underlying cost function

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread Matthieu Brucher
When Visual Studio 2008 will be used, there might be a way of using the manifest files (that were created for a similar purpose). For the moment, All I know is that you must put the dll in the Windows/system32 folder or somewhere in the PATH. Matthieu 2008/2/15, David Cournapeau <[EMAIL PROTECTED

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread Jon Wright
David Cournapeau wrote: > Hi, > > My head hurt trying to understand dll management with windows. I > wanted to find a sane way to use dll for numscons, but I can't see how > to do this, so I was wondering if anyone on this ML had any deep > knowledge on how to install dll, and reuse them wi

Re: [Numpy-discussion] String sort

2008-02-15 Thread Francesc Altet
A Thursday 14 February 2008, Charles R Harris escrigué: > On Thu, Feb 14, 2008 at 1:03 PM, Francesc Altet <[EMAIL PROTECTED]> wrote: > > Maybe I'd also be interested in trying insertion sort out. During > > the optimization process of an OPSI index, there is a need to sort > > out a slice of data

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Robin
On Thu, Feb 14, 2008 at 8:43 PM, Alexander Michael <[EMAIL PROTECTED]> wrote: > Is there a way to list all of the arrays that are referencing a given > array? Similarly, is there a way to get a list of all arrays that are > currently in memory? For the second question, if you are working interac

[Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2008-02-15 Thread David Cournapeau
Hi, My head hurt trying to understand dll management with windows. I wanted to find a sane way to use dll for numscons, but I can't see how to do this, so I was wondering if anyone on this ML had any deep knowledge on how to install dll, and reuse them with python extensions ? The problem

Re: [Numpy-discussion] List Array References?

2008-02-15 Thread Stefan van der Walt
Hi Alexander On Thu, Feb 14, 2008 at 03:43:46PM -0500, Alexander Michael wrote: > Is there a way to list all of the arrays that are referencing a given > array? Similarly, is there a way to get a list of all arrays that are > currently in memory? As far as I know, the reference count to the array

Re: [Numpy-discussion] String sort

2008-02-15 Thread Francesc Altet
Hi Chuck, I've given more testing to the new quicksort routines for strings in the forthcoming NumPy. I've run the indexing test units in PyTables Pro (they stress the sorting routines a lot) against the current version of NumPy in the repository, for the complete set of quicksort, mergesort

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Matthieu Brucher
OK, I'll try it then :) Is there an access to the underlying cost function ? (this is mainly what I need) Matthieu 2008/2/15, Davide Albanese <[EMAIL PROTECTED]>: > > I don't know very well libsvm too, the core of svm-mlpy is written in C > and was developed by Stefano Merler ([EMAIL PROTECTED])

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Davide Albanese
I don't know very well libsvm too, the core of svm-mlpy is written in C and was developed by Stefano Merler ([EMAIL PROTECTED]). I have simply wrapped it into svm() Python class. Regards, /* da */ Matthieu Brucher ha scritto: > Thanks for the reference :) > > I should have asked in other terms :

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Matthieu Brucher
Thanks for the reference :) I should have asked in other terms : how does it compare to libsvm, which is one of the most known packages for SVMs ? Matthieu 2008/2/15, Davide Albanese <[EMAIL PROTECTED]>: > > Dear Matthieu, > I don't know very well scikit. > The Svm is implemented by Sequential M

Re: [Numpy-discussion] MLPY - Machine Learning Py - Python/NumPy based package for machine learning

2008-02-15 Thread Davide Albanese
Dear Matthieu, I don't know very well scikit. The Svm is implemented by Sequential Minimal Optimization (SMO). As for Terminated Ramps (TR) you can read this paper: /S. Merler and G. Jurman/* Terminated Ramp - Support Vector Machine: a nonparametric data dependent kernel* Neural Network, 19(10), 1