Re: [Numpy-discussion] an np.arange for arrays?

2009-07-10 Thread David Warde-Farley
On 10-Jul-09, at 1:25 AM, Chris Colbert wrote: actually what would be better is if i can pass two 1d arrays X and Y both size Nx1 and get back a 2d array of size NxM where the [n,:] row is the linear interpolation of X[n] to Y[n] This could be more efficient, but here's a solution using

Re: [Numpy-discussion] an np.arange for arrays?

2009-07-10 Thread David Warde-Farley
On 10-Jul-09, at 1:26 PM, David Goldsmith wrote: grid = np.array([np.linspace(x[i],y[i],nrows) for i in range(len(x))]).T Indeed, linspace will work, but careful with Python loops though, it'll be 2x to 6x slower (based on my empirical fiddling) than the solution involving mgrid. In

Re: [Numpy-discussion] speeding up an array operation

2009-07-09 Thread David Warde-Farley
On 9-Jul-09, at 1:12 AM, Mag Gam wrote: Here is what I have, which does it 1x1: z={} #dictionary r=csv.reader(file) for i,row in enumerate(r): p=/MIT/+row[1] if p not in z: z[p]=0: else: z[p]+=1 arr[p]['chem'][z[p]]=tuple(row) #this loads the array 1 x 1 I would like to

Re: [Numpy-discussion] Optimizing reduction loops (sum(), prod(), et al.)

2009-07-09 Thread David Warde-Farley
On 8-Jul-09, at 6:16 PM, Pauli Virtanen wrote: Just to tickle some interest, a pathological case before optimization: In [1]: import numpy as np In [2]: x = np.zeros((8, 256)) In [3]: %timeit x.sum(axis=0) 10 loops, best of 3: 850 ms per loop After optimization: In

Re: [Numpy-discussion] bug using array with a PIL Image (misc.imread)

2009-07-07 Thread David Warde-Farley
That is some weird mojo; I'm guessing that numpy simply doesn't recognize the 'LA' type (luminance+alpha) as it's pretty uncommon. In the meantime you probably want to convert to RGBA, since that file giving you problems is grayscale+alpha channel, and a conversion to RGB might lose the

Re: [Numpy-discussion] Plans for Numpy 1.4.0 and scipy 0.8.0

2009-06-22 Thread David Warde-Farley
On 21-Jun-09, at 11:59 AM, David Cournapeau wrote: Can't really say at this point, but it is the suggested path to python-3. OTOH, I don't find the python 3 official transition story very convincing. I have tried to gather all the information I could find, both on the python wiki and from

Re: [Numpy-discussion] numpy port to Jython

2009-06-17 Thread David Warde-Farley
On 17-Jun-09, at 2:18 PM, Nils Wagner wrote: Is there a port of numpy/scipy to Jython ? Any pointer would be appreciated. Folks have successfully gotten it working from IronPython (the .NET CLR) via Ironclad ( http://code.google.com/p/ironclad/ )... not Jython though. David

Re: [Numpy-discussion] [OFFTOPIC] Reference management for articles

2009-06-10 Thread David Warde-Farley
On 10-Jun-09, at 3:23 PM, Gökhan SEVER wrote: I am very off-the-topic, sorry about that first, but I know most of the people in this list are students / scientists. Just want to know a few opinions upon how you manage references (following the list of references in the end of articles,

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

2009-06-09 Thread David Warde-Farley
On 9-Jun-09, at 3:54 AM, David Cournapeau wrote: For example, what ML people call PCA is called Karhunen Loéve in signal processing, and the concepts are quite similar. Yup. This seems to be a nice set of review notes: http://www.ece.rutgers.edu/~orfanidi/ece525/svd.pdf And going

Re: [Numpy-discussion] Howto vectorise a dot product ?

2009-06-09 Thread David Warde-Farley
On 9-Jun-09, at 2:56 PM, bruno Piguet wrote: Phi is now of size(n) and V (n, 3). (I really whish to have this shape, for direct correspondance to file). The corresponding function looks like : def rotat_vect(phi, V): s = np.sin(phi) c = np.cos(phi) M = np.zeros((len(phi), 3,

Re: [Numpy-discussion] Jcamp dx format

2009-06-09 Thread David Warde-Farley
On 7-Jun-09, at 4:56 AM, giorgio.luci...@inwind.it wrote: Sorry for cross posting Hello to all, I've done a script for importing all spectra files in a directory and merge all them in one matrix. The file imported are dx files. the bad part is that the file is in matlab and it requite a

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

2009-06-08 Thread David Warde-Farley
On 8-Jun-09, at 1:17 AM, David Cournapeau wrote: I would not be surprised if David had this paper in mind :) http://www.cs.toronto.edu/~roweis/papers/empca.pdf Right you are :) There is a slight trick to it, though, in that it won't produce an orthogonal basis on its own, just something

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

2009-06-08 Thread David Warde-Farley
On 8-Jun-09, at 8:33 AM, Jason Rennie wrote:Note that EM can be very slow to converge:That's absolutely true, but EM for PCA can be a life saver in cases where diagonalizing (or even computing) the full covariance matrix is not a realistic option. Diagonalization can be a lot of wasted effort if

Re: [Numpy-discussion] Interactive Shell/Editor/Workspace(variables)View/Plots

2009-06-08 Thread David Warde-Farley
On 8-Jun-09, at 12:58 PM, Jonno wrote: Thanks Josef, I shouldn't have included Matplotlib since Pydee does work well with its plots. I had forgotten that. It really is just the Mayavi plots (or scenes I guess) that don't play well. I don't know how exactly matplotlib integration issues are

[Numpy-discussion] Tuples vs. lists when defining recarrays with array()

2009-06-07 Thread David Warde-Farley
A question was raised on the #scipy IRC earlier today, about the behaviour of array() with structured dtypes. After some educated guessing I figured out that for record arrays, tuples (rather than lists) must be used to indicate atomic elements. What I wondered is whether this behaviour is

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

2009-06-07 Thread David Warde-Farley
On 7-Jun-09, at 6:12 AM, Gael Varoquaux wrote: Well, I do bootstrapping of PCAs, that is SVDs. I can tell you, it makes a big difference, especially since I have 8 cores. Just curious Gael: how many PC's are you retaining? Have you tried iterative methods (i.e. the EM algorithm for PCA)?

Re: [Numpy-discussion] extract elements of an array that are contained in another array?

2009-06-05 Thread David Warde-Farley
On 4-Jun-09, at 4:38 PM, Anne Archibald wrote: It seems to me that this is the basic source of the problem. Perhaps this can be addressed? I realize maintaining compatibility with the current behaviour is necessary, so how about a multistage deprecation: 1. add a keyword argument to

Re: [Numpy-discussion] [RFR] NpzFile tweaks (Re: Making NpzFiles behave more like dictionaries.)

2009-06-04 Thread David Warde-Farley
On 3-Jun-09, at 5:01 PM, Pauli Virtanen wrote: Btw, are you able to change the status of the ticket to needs_review? I think this should be possible for everyone, and not restricted to admins, but I'm not 100% sure... Sorry Pauli, seems I _don't_ have permission on the numpy trac to

Re: [Numpy-discussion] [RFR] NpzFile tweaks (Re: Making NpzFiles behave more like dictionaries.)

2009-06-04 Thread David Warde-Farley
On 4-Jun-09, at 9:28 AM, Stéfan van der Walt wrote: 2009/6/4 David Warde-Farley d...@cs.toronto.edu: Sorry Pauli, seems I _don't_ have permission on the numpy trac to change ticket status. The radio button shows up but then it gives me a Warning: No permission to change ticket fields

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

2009-06-04 Thread David Warde-Farley
On 4-Jun-09, at 5:03 PM, Anne Archibald wrote: Apart from the implementation issues people have chimed in about already, it's worth noting that the speed of matrix multiplication depends on the memory layout of the matrices. So generating B instead directly as a 100 by 500 matrix might affect

[Numpy-discussion] [RFR] NpzFile tweaks (Re: Making NpzFiles behave more like dictionaries.)

2009-06-03 Thread David Warde-Farley
On 2-Jun-09, at 3:06 PM, Pauli Virtanen wrote: +0 I don't see any drawbacks, and the implementation looks good. Thanks Pauli. I realized I was missing values() and itervalues() (though I can't conceive of a scenario where I'd use them myself, I guess some code might expect them). Also I

Re: [Numpy-discussion] [RFR] NpzFile tweaks (Re: Making NpzFiles behave more like dictionaries.)

2009-06-03 Thread David Warde-Farley
On 3-Jun-09, at 5:01 PM, Pauli Virtanen wrote: Btw, are you able to change the status of the ticket to needs_review? I think this should be possible for everyone, and not restricted to admins, but I'm not 100% sure... Sorry, yes I am. I had just forgotten. David

[Numpy-discussion] Making NpzFiles behave more like dictionaries.

2009-06-02 Thread David Warde-Farley
Hi, It's occasionally annoyed me that NpzFiles can't be swapped in transparently for an in-memory dictionary since getting at the keys requires an attribute access. Below is a patch that implements some more of the dictionary interface for the NpzFile class. Any comments as to whether

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-26 Thread David Warde-Farley
On 26-May-09, at 1:15 AM, Robert Kern wrote: I *did* do some due diligence before I designed a new binary format. Uh oh, I feel this might've taken a sharp turn towards another of course Robert is right, Robert is always right threads. :) David

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-24 Thread David Warde-Farley
On 24-May-09, at 5:22 PM, Robert Kern wrote: While I haven't tried Andrew Collette's h5py (http://code.google.com/p/h5py), it looks like a very 'thin' wrapper around the HDF5 C libraries. Maybe numpy's save(), savez(), load(), memmap() could be enhanced so that saving/loading files with

Re: [Numpy-discussion] matrix default to column vector?

2009-05-24 Thread David Warde-Farley
On 24-May-09, at 8:32 AM, Tom K. wrote: Maybe my reluctance to work with matrices stems from this kind of inconsistency. It seems like your code has to be all matrix, or all array - and if you mix them, you need to be very careful about which is which. Also, functions called on things of

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-23 Thread David Warde-Farley
On 23-May-09, at 5:36 AM, Albert Thuswaldner wrote: So i guess in the long term i have to also add pickling support. In the short term i will add warnings for the data types that are not supported. In order to ensure optimal division of labour, I'd suggest simply basing your pickling

[Numpy-discussion] Ticket #1113, change title?

2009-05-23 Thread David Warde-Farley
Can someone with the requisite permissions change the title of ticket #1113 to reflect the fact that it affects both ppc and ppc64? Alternately, if you know why the bug is happening, you could file a patch ;) David ___ Numpy-discussion mailing list

Re: [Numpy-discussion] Ticket #1113, change title?

2009-05-23 Thread David Warde-Farley
On 23-May-09, at 8:54 AM, David Cournapeau wrote: I have not looked at the code, but if the precision is indeed single precision, a tolerance of 1e-15 may not make much sense (single precision has 7 significant digits in normal representation) Yes, I was wondering about that too, though

Re: [Numpy-discussion] Ticket #1113, change title?

2009-05-23 Thread David Warde-Farley
On 23-May-09, at 2:33 PM, Pauli Virtanen wrote: Yes, I was wondering about that too, though notably the tests pass on x86, and in fact the result on ppc was nowhere near 0 when I checked it. What do you mean by nowhere near? What does the following output for you:

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-23 Thread David Warde-Farley
On 23-May-09, at 4:25 PM, Albert Thuswaldner wrote: Actually my vision with pyhdf5io is to have hdf5 to replace numpy's own binary file format (.npy, npz). Pyhdf5io (or an incarnation of it) should be the standard (binary) way to store data in scipy/numpy. A bold statement, I know, but I

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-23 Thread David Warde-Farley
On 23-May-09, at 4:59 PM, Robert Kern wrote: Otherwise it will just work the way it does now. That would cause difficulties. Now the format of your data depends on whether or not you have a package installed. That's not a very good level of control. Sorry, I wasn't clear. What I meant

Re: [Numpy-discussion] List/location of consecutive integers

2009-05-22 Thread David Warde-Farley
On 22-May-09, at 1:03 PM, Christopher Barker wrote: In [104]: zip(indices[np.r_[True, breaks[:-1]]], indices[breaks]) I don't think this is very general: In [53]: indices Out[53]: array([ -3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 256, 257, 258,

Re: [Numpy-discussion] Home for pyhdf5io?

2009-05-21 Thread David Warde-Farley
Hi Albert, So this is a wrapper on top of PyTables to implement load() and save()? Neat. Obviously if you're installing PyTables, you can do a lot better and organize your data hierarchically without the messiness of Matlab structures, walk the node tree, all kinds of fun stuff, but if

[Numpy-discussion] build failure with macosx-10.5-fat64-2.6

2009-05-19 Thread David Warde-Farley
I've just tried a fat 64 build (with a Python 2.6.2 that had been built similarly), and I'm getting this weird behaviour. The command I used was: CFLAGS=-O3 -Wall -DNDEBUG -g -fwrapv -Wstrict-prototypes -arch x86_64 -arch ppc64 python setup.py build It looks as though for some reason,

Re: [Numpy-discussion] FAIL: Test bug in reduceat with structured arrays

2009-05-13 Thread David Warde-Farley
On 11-May-09, at 10:55 AM, Pauli Virtanen wrote: Wonder why buildbot's 64-bit SPARC boxes don't see this if it's something connected to 64-bitness... Different endianness, maybe? That seems even weirder, honestly. David ___ Numpy-discussion

Re: [Numpy-discussion] Matlab/Numpy index order

2009-05-12 Thread David Warde-Farley
On 12-May-09, at 3:55 PM, Ryan May wrote: It's going to be faster to do it without the transpose. Besides, for numpy, that imshow becomes: imshow(b[0]) Which, IMHO, looks better than Matlab. You're right, that is better, odd how I never thought of doing it like that. I've been

Re: [Numpy-discussion] OS-X binary name...

2009-05-06 Thread David Warde-Farley
On 6-May-09, at 2:03 AM, Christopher Barker wrote: maybe: numpy-1.3.0-py2.5-macosx-python.org.dmg +1 on having python.org in the name. It clarifies and reinforces the case that this isn't for the Apple-shipped Python (which I heard comes with NumPy now?). David

[Numpy-discussion] object arrays and ==

2009-05-04 Thread David Warde-Farley
Hi, Is there a simple way to compare each element of an object array to a single object? objarray == None, for example, gives me a single False. I couldn't find any reference to it in the documentation, but I'll admit, I wasn't quite sure where to look. David

Re: [Numpy-discussion] inplace matrix multiplication

2009-04-29 Thread David Warde-Farley
On 28-Apr-09, at 10:56 AM, Dan Goodman wrote: Can anyone explain the results below? It seems that for small matrices dot(x,y) is outperforming dgemm(1,x,y,0,y,overwrite_c=1), but for larger matrices the latter is winning. In principle it seems like I ought to be able to always do better

Re: [Numpy-discussion] Funky vectorisation question

2009-04-29 Thread David Warde-Farley
On 29-Apr-09, at 5:06 PM, Dan Goodman wrote: Here's the problem I want to write vectorised code for. I start with an array of indices, say I=array([0,1,0,2,0,1,4]), and I want to come up with an array C that counts how many times each index has been seen so far if you were counting

Re: [Numpy-discussion] Funky vectorisation question

2009-04-29 Thread David Warde-Farley
On 29-Apr-09, at 5:49 PM, Dan Goodman wrote: Thanks David, that's nice but unfortunately that Python loop will kill me. I'm thinking about some simulation code I'm writing where this operation will be carried out many, many times, with large arrays I. I figure I need to keep the Python

Re: [Numpy-discussion] inplace matrix multiplication

2009-04-24 Thread David Warde-Farley
On 9-Jan-09, at 4:31 PM, Robert Kern wrote: You can't in numpy. With scipy.linalg.fblas.dgemm() and the right arguments, you can. Make sure your output array is Fortran-ordered, however, otherwise copies will be made. David ___ Numpy-discussion

Re: [Numpy-discussion] after building from source, how to register numpy with synaptic?

2009-04-24 Thread David Warde-Farley
On 24-Apr-09, at 10:11 PM, Chris Colbert wrote: Like the subject says, is there a way to register numpy with synaptic after building numpy from source? I would like to snag matplotlib from the ubuntu repos, but it won't let me without also getting numpy and its dependency, which would

Re: [Numpy-discussion] Is it ok to include GPL scripts in the numpy *repository* ?

2009-03-28 Thread David Warde-Farley
Alan G Isaac wrote: On 3/27/2009 6:48 AM David Cournapeau apparently wrote: To build the numpy .dmg mac os x installer, I use a script from the adium project, which uses applescript and some mac os x black magic. The script seems to be GPL, as adium itself: It might be worth a query

[Numpy-discussion] Moved python install, import errors

2009-03-27 Thread David Warde-Farley
Hi all, I built ATLAS, Python 2.5 and NumPy on the local disk of a cluster node, so that disk access would be faster than over NFS, and then moved it back. I made sure to modify all the relevant paths in __config__.py but when importing I receive this error, which I can't make heads or

Re: [Numpy-discussion] Where is the instruction of installing numpy with Intel lib MKL?

2009-03-26 Thread David Warde-Farley
On 26-Mar-09, at 3:32 PM, Ben Park wrote: BTW, this timing on a core 2 Duo 2.0GH laptop ,with the Enthought Python Distribution, is around 0.2 second. You're going to have to build NumPy yourself to link it against the MKL, I believe. EPD's is probably using something fairly basic. You

Re: [Numpy-discussion] inplace dot products

2009-03-16 Thread David Warde-Farley
On 20-Feb-09, at 6:41 AM, Olivier Grisel wrote: Alright, thanks for the reply. Is there a canonical way /sample code to gain low level access to blas / lapack atlas routines using ctypes from numpy / scipy code? I don't mind fixing the dimensions and the ndtype of my array if it can

Re: [Numpy-discussion] Faster way to generate a rotation matrix?

2009-03-03 Thread David Warde-Farley
On 3-Mar-09, at 11:41 PM, Jonathan Taylor wrote: def rotation(theta, R = np.zeros((3,3))): Hey Jon, Just a note, in case you haven't heard this schpiel before: be careful when you use mutables as default arguments. It can lead to unexpected behaviour down the line. The reason is that the

Re: [Numpy-discussion] Faster way to generate a rotation matrix?

2009-03-03 Thread David Warde-Farley
On 4-Mar-09, at 1:58 AM, Robert Kern wrote: I'm pretty sure that's exactly why he did it, and that's what he's calling evil. As ever, such nuance is lost on me. I didn't bother to check whether or not it was in the original function. Robert to the rescue. :) It's a neat trick, actually,

Re: [Numpy-discussion] Faster way to generate a rotation matrix?

2009-03-03 Thread David Warde-Farley
On 4-Mar-09, at 1:50 AM, Hoyt Koepke wrote: I would definitely encourage you to check out cython. I have to write lots of numerically intensive stuff in my python code, and I tend to cythonize it a lot. Seconded. I recently took some distance computation code and Cythonized it, I got an

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-03-02 Thread David Warde-Farley
On 28-Feb-09, at 12:27 PM, Jonathan Taylor wrote: This does seem like the only way to write this nicely. Unfortunately, I think this may be wasteful memory wise (in contrast to what the obvious matlab code would do) as it constructs an array with the whole first index intact at first. True

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-03-02 Thread David Warde-Farley
On 2-Mar-09, at 12:25 PM, Robert Kern wrote: a[[2,3,6], ...][..., [3,2]] You're doing fancy indexing, so there are copies both times. D'oh! So I guess the only way to avoid the second copy is to do what Jon initially suggested, i.e. a[ix_([2,3,6],range(a.shape[1]),[3,2])] ? I suppose

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-02-27 Thread David Warde-Farley
Hey Jon, On 26-Feb-09, at 10:00 PM, Jonathan Taylor wrote: Am I right to assume that there is no way elegant way to interact with slices. i.e. Is there anyway to get a[ix_([2,3,6],:,[3,2])] to work? So that the dimension is completely specified? Or perhaps the only way to do this is

Re: [Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

2009-02-27 Thread David Warde-Farley
On 27-Feb-09, at 3:35 PM, David Warde-Farley wrote: a[[2,3,6],:,:][:,:,[3,2]] should do what you want. Slightly more elegantly (I always forget about this syntax): a[[2,3,6], ...][..., [3,2]] David ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
Hi Olivier, There was this idea posted on the Scipy-user list a while back: http://projects.scipy.org/pipermail/scipy-user/2008-August/017954.html but it doesn't look like he got anywhere with it, or even got a response. I just tried it and I observe the same behaviour. A quick look

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
On 20-Feb-09, at 6:39 AM, David Cournapeau wrote: You can just use ctypes to access ATLAS, as you would do for any library. Or do you mean something else ? Say, David... :) Do you have any idea why the pyf wrapper for fblas3 completely ignores the overwrite_c argument? Fiddling around I've

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
On 20-Feb-09, at 10:39 AM, Robert Kern wrote: Fiddling around I've found other blas/lapack functions where the same arg is offered but the choice actually does something. Examples? scipy.lib.lapack.flapack.dpotri, for example. I'm not sure of the proper usage, but when I pass it an

Re: [Numpy-discussion] inplace dot products

2009-02-20 Thread David Warde-Farley
On 20-Feb-09, at 10:39 AM, Robert Kern wrote: Fiddling around I've found other blas/lapack functions where the same arg is offered but the choice actually does something. Examples? An even better example is scipy.linalg.fblas.dgemv, the matrix-vector equivalent of dgemm. overwrite_y

Re: [Numpy-discussion] [SciPy-user] os x, intel compilers mkl, and fink python

2008-12-01 Thread David Warde-Farley
On 28-Nov-08, at 5:38 PM, Gideon Simpson wrote: Has anyone gotten the combination of OS X with a fink python distribution to successfully build numpy/scipy with the intel compilers and the mkl? If so, how'd you do it? IIRC David Cournapeau has had some success building numpy with MKL on

Re: [Numpy-discussion] Proposal for changing the names of inverse trigonometrical/hyperbolic functions

2008-11-24 Thread David Warde-Farley
On 24-Nov-08, at 4:22 PM, Gabriel Gellner wrote: asin(1j) raises an exception, arcsin doesn't. They are *different* functions, hence the names. Yet: type(np.sin(1)) == type(math.sin(1)) False In fact, this goes for every single function listed in the math module's docs, except for the

Re: [Numpy-discussion] Getting indices from numpy array with condition

2008-11-18 Thread David Warde-Farley
On 18-Nov-08, at 5:29 AM, Nicolas ROUX wrote: Hi, Maybe this is not so clever, but I can't find it in the doc. I need to get all indices/index of all occurrences of a value in a numpy array As example: a = numpy.array([1,2,3],[4,5,6],[7,8,9]) I need to get the indice/index of all

Re: [Numpy-discussion] Segfault with dotblas on OS X 10.5.5/PPC (but not on Intel?)

2008-11-13 Thread David Warde-Farley
On 12-Nov-08, at 8:18 PM, David Cournapeau wrote: On Wed, 2008-11-12 at 19:24 -0500, David Warde-Farley wrote: Indeed, for the size of problem I *thought* I was running, 32 bit would be sufficient. In fact I had my data transposed and so was working with a much larger matrix which would

Re: [Numpy-discussion] Numpy and MKL, update

2008-11-13 Thread David Warde-Farley
On 13-Nov-08, at 8:47 PM, David Cournapeau wrote: On Fri, Nov 14, 2008 at 5:23 AM, frank wang [EMAIL PROTECTED] wrote: Hi, Can you provide a working example to build Numpy with MKL in window and linux? The reason I am thinking to build the system is that I need to make the speed

[Numpy-discussion] Segfault with dotblas on OS X 10.5.5/PPC (but not on Intel?)

2008-11-12 Thread David Warde-Farley
Hello folks, I'm doing some rather big matrix products on a G5, and ran into this. Strangely on the same OS version on my Intel laptop, this isn't an issue. Available memory isn't the problem either, I don't think, this machine is pretty beefy. I'm running the python.org 2.5.2 build of

Re: [Numpy-discussion] Segfault with dotblas on OS X 10.5.5/PPC (but not on Intel?)

2008-11-12 Thread David Warde-Farley
On 12-Nov-08, at 6:05 PM, Michael Abshoff wrote: I'm running the python.org 2.5.2 build of Python, and the latest SVN build of numpy (though the same thing happened with 1.1.0). IIRC that is a universal build for 32 bit PPC and Intel, so depending on the problem size 32 bits might be

Re: [Numpy-discussion] import 16-bit tiff - byte-order problem?

2008-11-07 Thread David Warde-Farley
On 6-Nov-08, at 11:15 PM, Angus McMorland wrote: 2008/11/6 Robert Kern [EMAIL PROTECTED]: On Thu, Nov 6, 2008 at 21:54, Angus McMorland [EMAIL PROTECTED] wrote: Hi all, I'm trying to import a 16-bit tiff image into a numpy array. I have found, using google, suggestions to do the

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-29 Thread David Warde-Farley
On 29-Oct-08, at 3:43 PM, Robert Kern wrote: Eh, that's not entirely true. x = 1 x += 2 That's not in-place. They are called augmented assignments, not in-place operations for this reason. The defining characteristic is that x op= y should be equivalent to x = x op y except possibly

Re: [Numpy-discussion] any interest in including a second-ordergradient?

2008-10-28 Thread David Warde-Farley
On 28-Oct-08, at 5:57 PM, Fabrice Silva wrote: Are there some parts of the code that may be used only once to calculate both the gradient and the second derivative (isn't it called the hessian, at least in the N-d case) ? Probably. I'd imagine depends on your differencing scheme; central

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-27 Thread David Warde-Farley
On 27-Oct-08, at 7:22 AM, James Philbin wrote: One operator which could be used is '%'. We could keep the current behaviour for ARRAY%SCALAR but have ARRAY%ARRAY as being matrix multiplication. It has the same precedence as *,/. The problem is that it would monkey with existing semantics for

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-26 Thread David Warde-Farley
On 26-Oct-08, at 9:43 AM, James Philbin wrote: This hack for defining infix operators might be relevant: http://code.activestate.com/recipes/384122/ I think someone mentioned this at the doc BOF, but it was raised that this has problems with associativity, etc. David

<    1   2   3