Re: [Numpy-discussion] Problem Building Numpy with Python 2.7.1 and OS X 10.7.3

2012-02-26 Thread Samuel John
Hi The plain gcc (non-llvm) is no longer there, if you install Lion and directly Xcode 4.3. Only, if you have the old Xcode 4.2 or lower, then you may have a non-llvm gcc. For Xcode 4.3, I recommend installing the "Command Line Tools for Xcode" from the preferences of Xcode. Then you'll have th

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-20 Thread Samuel John
On 17.02.2012, at 21:46, Ralf Gommers wrote: > [...] > So far no one has managed to build the numpy/scipy combo with the LLVM-based > compilers, so if you were willing to have a go at fixing that it would be > hugely appreciated. See http://projects.scipy.org/scipy/ticket/1500 for > details. >

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

2012-02-15 Thread Samuel John
Wow, I wasn't aware of that even if I work with numpy for years now. NumPy is amazing. Samuel ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] I must be wrong? -- endian detection failure on Mac OSX 10.5

2012-02-01 Thread Samuel John
Hi! Your Machine should be able to handle at least Mac OS X10.6 and even 10.7. If there is not a strong reason to remain on 10.5... 10.5 is so long ago, I can barely remember. cheers, Samuel On 01.02.2012, at 18:03, Dustin Lang wrote: > > Hi, > > I don't really believe this is a numpy bug t

Re: [Numpy-discussion] histogram help

2012-01-30 Thread Samuel John
Hi Ruby, I still do not fully understand your question but what I do in such cases is to construct a very simple array and test the functions. The help of numpy.histogram2d or numpy.histogramdd (for more than two dims) might help here. So I guess, basically you want to ignore the x,y positions

Re: [Numpy-discussion] Problem installing NumPy with Python 3.2.2/MacOS X 10.7.2

2012-01-26 Thread Samuel John
Hi Hans-Martin! You could try my instructions recently posted to this list http://thread.gmane.org/gmane.comp.python.scientific.devel/15956/ Basically, using llvm-gcc scipy segfaults when scipy.test() (on my system at least). Therefore, I created the homebrew install formula. They work for wha

Re: [Numpy-discussion] OT: MS C++ AMP library

2012-01-26 Thread Samuel John
Yes, I agree 100%. On 26.01.2012, at 10:19, Sturla Molden wrote: > When we have nice libraries like OpenCL, OpenGL and OpenMP, I am so glad > we have Microsoft to screw it up. > > Congratulations to Redmond: Another C++ API I cannot read, and a > scientific compute library I hopefully never hav

Re: [Numpy-discussion] installing matplotlib in MacOs 10.6.8.

2012-01-24 Thread Samuel John
Sorry for the late answer. But at least for the record: If you are using eclipse, I assume you have also installed the eclipse plugin [pydev](http://pydev.org/). Is use it myself, it's good. Then you have to go to the preferences->pydev->PythonInterpreter and select the python version you want

Re: [Numpy-discussion] 'Advanced' save and restore operation

2012-01-24 Thread Samuel John
I know you wrote that you want "TEXT" files, but never-the-less, I'd like to point to http://code.google.com/p/h5py/ . There are viewers for hdf5 and it is stable and widely used. Samuel On 24.01.2012, at 00:26, Emmanuel Mayssat wrote: > After having saved data, I need to know/remember the da

Re: [Numpy-discussion] Unexpected behavior with np.min_scalar_type

2012-01-24 Thread Samuel John
I get the same results as you, Kathy. *surprised* (On OS X (Lion), 64 bit, numpy 2.0.0.dev-55472ca, Python 2.7.2. On 24.01.2012, at 16:29, Kathleen M Tacina wrote: > I was experimenting with np.min_scalar_type to make sure it worked as > expected, and found some unexpected results for integers

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

2012-01-24 Thread Samuel John
On 23.01.2012, at 11:23, David Warde-Farley wrote: >> a = numpy.array(numpy.random.randint(256,size=(500,972)),dtype='uint8') >> b = numpy.random.randint(500,size=(4993210,)) >> c = a[b] >> In [14]: c[100:].sum() >> Out[14]: 0 Same here. Python 2.7.2, 64bit, Mac OS X (Lion), 8GB RAM,

Re: [Numpy-discussion] The NumPy Mandelbrot code 16x slower than Fortran

2012-01-23 Thread Samuel John
I'd like to add http://git.tiker.net/pyopencl.git/blob/HEAD:/examples/demo_mandelbrot.py to the discussion, since I use pyopencl (http://mathema.tician.de/software/pyopencl) with great success in my daily scientific computing. Install with pip. PyOpenCL does understand numpy arrays. You write

Re: [Numpy-discussion] Ufuncs and flexible types, CAPI

2012-01-10 Thread Samuel John
[sorry for duplicate - I used the wrong mail address] I am afraid, I didn't quite get the question. What is the scenario? What is the benefit that would weight out the performance hit of checking whether there is a callback or not. This has to be evaluated quite a lot. Oh well ... and 1.3.0 is

Re: [Numpy-discussion] SParse feature vector generation

2012-01-10 Thread Samuel John
I would just use a lookup dict: names = [ "uc_berkeley", "stanford", "uiuc", "google", "intel", "texas_instruments", "bool"] lookup = dict( zip( range(len(names)), names ) ) Now, given you have n entries: S = numpy.zeros( (n, len(names)) ,dtype=numpy.int32) for k in ["uc_berkeley", "google",

Re: [Numpy-discussion] simple vector->matrix question

2011-10-06 Thread Samuel John
I just learned two things: 1. np.newaxis 2. Array dimension broadcasting rocks more than you think. The x[:, np.newaxis] might not be the most intuitive solution but it's great and powerful. Intuitive would be to have x.T to transform [0,1,2,4] into [[0],[1],[2],[4]]. Thanks Warren :-) Samuel

Re: [Numpy-discussion] simple vector->matrix question

2011-10-06 Thread Samuel John
import numpy # Say y is y = numpy.array([1,2,3]) Y = numpy.vstack([y,y,y,y]) # Y is array([[1, 2, 3], # [1, 2, 3], # [1, 2, 3], # [1, 2, 3]]) x = numpy.array([[0],[2],[4],[6]]) # a column-vector of your scalars x0, x1... Y - x Hope this is what you meant. cheers, Sa

Re: [Numpy-discussion] OS X Lion: llvm: numpy and scipy

2011-09-20 Thread Samuel John
Hi! On 20.09.2011, at 14:41, David Cournapeau wrote: > On Tue, Sep 20, 2011 at 5:13 AM, Samuel John wrote: >> Ralf, thanks for your answer. >> >> However, in short: >> >> I want `pip install numpy; pip install scipy` to work on OS X Lion without >> extr

Re: [Numpy-discussion] OS X Lion: llvm: numpy and scipy

2011-09-20 Thread Samuel John
Ralf, thanks for your answer. However, in short: I want `pip install numpy; pip install scipy` to work on OS X Lion without extra effort :-) On 19.09.2011, at 19:05, Ralf Gommers wrote: > Do you think it's possible to teach numpy to use different CC, CXX? > >> This is possible, but numpy pro

[Numpy-discussion] OS X Lion: llvm: numpy and scipy

2011-09-19 Thread Samuel John
Ahoy numpy gurus :-) Would it be possible to adapt the setup.py and/or numpy/distutils to set the right variables on Mac OS X 10.7? (see below). I have looked a bit into the setup.py and the distutils package of numpy but I am a bit lost. Do you think it's possible to teach numpy to use differe

Re: [Numpy-discussion] [ANN] glumpy 0.2.0

2011-09-16 Thread Samuel John
Hi Nicolas, that looks great. Could you make this available such that `pip install glumpy` would work? cheers, Samuel ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Functions for finding the relative extrema of numeric data

2011-09-15 Thread Samuel John
middle is returned. > > If there are two adjacent elements with the same value, > one of them is returned. > > x[0] and x[-1] are never returned as an index for the > local maximum. > > @Author: Samuel John > @copyright:

Re: [Numpy-discussion] numpy.test() failure

2011-09-14 Thread Samuel John
Hi Nils, which version of numpy, which os? I can infer that you use python 2.6 in 64bit, right? Right after the beginning of the numpy.test() are some crucial information. bests Samuel On 14.09.2011, at 22:09, Nils Wagner wrote: > ERROR: test_polyfit (test_polynomial.TestDocs) > -

Re: [Numpy-discussion] numpy blas running slow: how to check that it is properly linked

2011-09-07 Thread Samuel John
On 06.09.2011, at 22:13, David Cottrell wrote: > Thanks, I didn't realize dot was not just calling dgemm or some > variant which I assume would be reasonably fast. I see dgemm appears > in the numpy code in various places such as the lapack_lite module. > > I ran the svd test on the solaris setu

Re: [Numpy-discussion] How to tell if I succeeded to build numpy with amd, umfpack and lapack

2011-02-19 Thread Samuel John
Thanks Robin, that makes sense and explains why I could not find any reference. Perhaps the scipy.org wiki and install instructions should be updated. I mean how many people try to compile amd and umfpack, because they think it's good for numpy to have them, because the site.cfg contains those en

Re: [Numpy-discussion] How to tell if I succeeded to build numpy with amd, umfpack and lapack

2011-02-18 Thread Samuel John
Ping. How to tell, if numpy successfully build against libamd.a and libumfpack.a? How do I know if they were successfully linked (statically)? Is it possible from within numpy, like show_config() ? I think show_config() has no information about these in it :-( Anybody? Thanks, Samuel __

Re: [Numpy-discussion] How to tell if I succeeded to build numpy with amd, umfpack and lapack

2011-01-27 Thread Samuel John
Hi Paul, thanks for your answer! I was not aware of numpy.show_config(). However, it does not say anything about libamd.a and libumfpack.a, right? How do I know if they were successfully linked (statically)? Does anybody have a clue? greetings Samuel

[Numpy-discussion] How to tell if I succeeded to build numpy with amd, umfpack and lapack

2011-01-26 Thread Samuel John
the fftw3 is no longer supported, I guess (even if it is still mentioned in the site.cfg.example) Bests, Samuel -- Dipl.-Inform. Samuel John - - - - - - - - - - - - - - - - - - - - - - - - - PhD student, CoR-Lab(.de) and Neuroinformatics Group, Faculty of Technology, D33594 Bielefeld in cooperat

Re: [Numpy-discussion] Building numpy on Mac OS X 10.6, i386 (no ppc) 32/64bit: Error in Fortran tests due to ppc64

2010-08-16 Thread Samuel John
Perhaps related tickets, but no perfect match (as far as I can judge): - http://projects.scipy.org/numpy/ticket/1399 "distutils fails to build ppc64 support on Mac OS X when requested" This revision is older than the one I used, ergo should already be applied. - http://projects.scipy.org

[Numpy-discussion] Building numpy on Mac OS X 10.6, i386 (no ppc) 32/64bit: Error in Fortran tests due to ppc64

2010-08-16 Thread Samuel John
Hello! At first, I'd like to say thanks to the numpy/scipy team and all contributors. Great software! On Snow Leopard, aka Mac OS X 10.6.4 (server) I managed to build numpy 2.0.0.dev8636 (and scipy 0.9.0.dev6646) for arch i386 in combined 32/64bit against MacPorts python27 (No ppc here!). All