Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Chris Barker
On 12/1/2011 9:15 AM, Derek Homeier wrote: np.array((2, 12,0.001+2j), dtype='|S8') array(['2', '12', '(0.001+2'], dtype='|S8') - notice the last value is only truncated because it had first been converted into a standard complex representation, so maybe the problem is already in the way

Re: [Numpy-discussion] What does fftn take as parameters?

2011-12-06 Thread Chris Barker
On 12/6/2011 8:32 AM, Roger Binns wrote: I think this cannot be helped --- it does not make sense to explain basic Numpy concepts in every docstring, especially `axis` and `shape` are very common. They don't need to be explained on the page, but instead link to a page that does explain them.

Re: [Numpy-discussion] howto store 2D function values and their grid points

2011-12-06 Thread Chris Barker
On 12/6/2011 9:54 AM, K.-Michael Aye wrote: I have a function f(x,y). I would like to calculate it at x = arange(20,101,20) and y = arange(2,30,2) How do I store that in a multi-dimensional array and preserve the grid points where I did the calculation In [5]: X, Y = np.meshgrid(range(3),

Re: [Numpy-discussion] Fast Reading of ASCII files

2011-12-13 Thread Chris Barker
NOTE: Let's keep this on the list. On Tue, Dec 13, 2011 at 9:19 AM, denis denis-bz...@t-online.de wrote: Chris, unified, consistent save / load is a nice goal 1) header lines with date, pwd etc.: where'd this come from ? # (5, 5) svm.py bz/py/ml/svm 2011-12-13 Dec 11:56 --

Re: [Numpy-discussion] Fast Reading of ASCII files

2011-12-13 Thread Chris Barker
On Tue, Dec 13, 2011 at 11:29 AM, Bruce Southey bsout...@gmail.com wrote: ** Reading data is hard and writing code that suits the diversity in the Numerical Python community is even harder! yup Both loadtxt and genfromtxt functions (other functions are perhaps less important) perhaps need

Re: [Numpy-discussion] Fast Reading of ASCII files

2011-12-14 Thread Chris Barker
On Wed, Dec 14, 2011 at 11:36 AM, Benjamin Root ben.r...@ou.edu wrote: well, yes, though it does do a lot -- do you have a smpler one in mind? Just looking at what I normally wouldn't need for simple data files and/or what a beginning user won't understand at once, the `unpack` and `ndmin`

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

2011-12-27 Thread Chris Barker
I suspect your getting a bit tangled up in the multiple binaries of Python on the Mac. On the python.org site there are two binaries: 32bit, PPC_Intel, OS-X 10.3.9 and above. 32 and 64 bit, Intel only, OS-X 10.6 and above. You need to make sure that you get a matplotlib build for the python

Re: [Numpy-discussion] Returning tuple of numpy arrays from a Numpy C-extension?

2011-12-27 Thread Chris Barker
sorry to be a proselytizer, but this would be trivial with Cython: http://cython.org/ -Chris On Tue, Dec 27, 2011 at 1:52 AM, Åke Kullenberg ake.kullenb...@gmail.com wrote: After diving deeper in the docs I found the PyTuple_New alternative to building tuples instead of Py_BuildValue. It

Re: [Numpy-discussion] GSOC

2011-12-30 Thread Chris Barker
On Thu, Dec 29, 2011 at 1:36 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: First thought: very useful, but probably not GSOC topics by themselves. Documentation is specificsly excluded from GSoC (at least it was a couple years ago when I last was involved) Not sure about testing, but I'd

Re: [Numpy-discussion] GSOC

2012-01-03 Thread Chris Barker
On Fri, Dec 30, 2011 at 9:43 PM, Jaidev Deshpande deshpande.jai...@gmail.com wrote: Documentation is specificsly excluded from GSoC (at least it was a couple years ago when I last was involved) Documentation wasn't excluded last year from GSoC, there were quite a few projects that required a

Re: [Numpy-discussion] Counting the Colors of RGB-Image

2012-01-17 Thread Chris Barker
Here's a thought: Too bad numpy doesn't have a 24 bit integer, but you could tack a 0 on, making your image 32 bit, then use histogram2d to count the colors. something like (untested): # create the 32 bit image 32bit_im = np.zeros((w, h), dtype = np.uint32) view = 32bit_im.view(dtype =

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

2012-01-22 Thread Chris Barker
2012/1/22 Ondřej Čertík ondrej.cer...@gmail.com: If I have time, I'll try to provide an equivalent Fortran version too, for comparison. Ondrej here is a Cython example: http://wiki.cython.org/examples/mandelbrot I haven't looked to see if it's the same algorithm, but it may be instructive,

Re: [Numpy-discussion] Counting the Colors of RGB-Image

2012-01-23 Thread Chris Barker
On Wed, Jan 18, 2012 at 1:26 AM, a...@pdauf.de wrote: Your ideas are very helpfull and the code is very fast. I'm curios -- a number of ideas were floated here -- what did you end up using? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR          

[Numpy-discussion] view of a structured array?

2012-01-25 Thread Chris Barker
HI folks, Is there a way to get a view of a subset of a structured array? I know that an arbitrary subset will not fit into the numpy stridesoffsets model, but some will, and it would be nice to have a view: For example, here we have a stuctured array: In [56]: a Out[56]: array([(1, 2.0, 3.0,

Re: [Numpy-discussion] view of a structured array?

2012-01-25 Thread Chris Barker
On Wed, Jan 25, 2012 at 11:33 AM, josef.p...@gmail.com wrote: that's what I would try: b = a.view(dtype=[('i', 'i4'), ('fl',[('f1', 'f8'), ('f2', 'f8')]), ('i2', 'i4')]) ah yes, I forgot about nesting dtypes -- very nice, thanks! -Chris b['fl'] array([(2.0, 3.0), (8.0, 9.0),

Re: [Numpy-discussion] preferred way of testing empty arrays

2012-01-30 Thread Chris Barker
On Fri, Jan 27, 2012 at 1:29 PM, Robert Kern robert.k...@gmail.com wrote: Well, if you really need to do this in more than one place, define a utility function and call it a day. def should_not_plot(x):    if x is None:        return True    elif isinstance(x, np.ndarray):        return

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

2012-01-31 Thread Chris Barker
On Tue, Jan 31, 2012 at 6:33 AM, Neal Becker ndbeck...@gmail.com wrote: The reason it surprised me, is that python 'all' doesn't behave as numpy 'all' in this respect - and using ipython, I didn't even notice that 'all' was numpy.all rather than standard python all. namespaces are one honking

Re: [Numpy-discussion] Unexpected reorganization of internal data

2012-01-31 Thread Chris Barker
On Tue, Jan 31, 2012 at 6:14 AM, Malcolm Reynolds malcolm.reyno...@gmail.com wrote: Not exactly an answer to your question, but I can highly recommend using Boost.python, PyUblas and Ublas for your C++ vectors and matrices. It gives you a really good interface on the C++ side to numpy arrays

Re: [Numpy-discussion] ValueError: total size of new array must be unchanged only on Windows

2012-02-06 Thread Chris Barker
On Sun, Feb 5, 2012 at 10:41 AM, Paolo p.zaff...@yahoo.it wrote: I solved using 'rb' instead of 'r' option in the open file task. that would do it, if it's binary data, but you might as well so it right: matrix=.join(f.readlines()) readlines is giving you a list of the data, as separated

Re: [Numpy-discussion] how to insert some specific delay

2012-02-08 Thread Chris Barker
On Wed, Feb 8, 2012 at 10:18 AM, Debashish Saha silid...@gmail.com wrote: how to insert some specific delay in python programming using numpy command. do you mean a time delay? If so -- numpy doesn't (and shouldn't) have such a thing. however, the time module has time.sleep() whether it's a

Re: [Numpy-discussion] Creating parallel curves

2012-02-10 Thread Chris Barker
Andrea, Basically I have a set of x, y data (around 1,000 elements each) and I want to create 2 parallel curves (offset curves) to the original one; parallel means curves which are displaced from the base curve by a constant offset, either positive or negative, in the direction of the

Re: [Numpy-discussion] Creating parallel curves

2012-02-13 Thread Chris Barker
On Mon, Feb 13, 2012 at 1:01 AM, Niki Spahiev niki.spah...@gmail.com wrote: You can get polygon buffer from http://angusj.com/delphi/clipper.php and make cython interface to it. This should be built into GEOS as well, and the shapely package provides a python wrapper already. -Chris HTH

Re: [Numpy-discussion] [IPython-dev] Discussion with Guido van Rossum and (hopefully) core python-dev on scientific Python and Python3

2012-02-14 Thread Chris Barker
On Mon, Feb 13, 2012 at 6:19 PM, Mark Wiebe mwwi...@gmail.com wrote: It might be nice to turn the matrix class into a short class hierarchy, am I confused, or did a thread get mixed in? This seems to be a numpy/scipy thing, not a Python3 thing. Or is there some support in Python itself required

Re: [Numpy-discussion] [IPython-dev] Discussion with Guido van Rossum and (hopefully) core python-dev on scientific Python and Python3

2012-02-14 Thread Chris Barker
On Tue, Feb 14, 2012 at 9:16 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: It was about the need for a dedicated matrix multiplication operator. has anyone proposed that? I do think we've had a proposal on the table for generally more operators: i.e. like matlab's .* vs *, and yes,

Re: [Numpy-discussion] Numpy governance update

2012-02-16 Thread Chris Barker
On Wed, Feb 15, 2012 at 11:23 AM, Inati, Souheil (NIH/NIMH) [E]  As great and trustworthy as Travis is, there is a very real potential for conflict of interest here. He is going to be leading an organization to raise and distribute funding and at the same time leading a commercial for profit

Re: [Numpy-discussion] Numpy governance update

2012-02-16 Thread Chris Barker
On Wed, Feb 15, 2012 at 1:36 PM, Matthew Brett Personally, I would say that making the founder of a company, which is working to make money from Numpy, the only decision maker on numpy - is - scary. not to me: -- power always goes to those that actually write the code -- as far as I can

Re: [Numpy-discussion] Numpy governance update

2012-02-16 Thread Chris Barker
On Thu, Feb 16, 2012 at 11:03 AM, Matthew Brett matthew.br...@gmail.com wrote: But surely - surely - the best thing to do here is to formulate something that might be acceptable, and for everyone to say what they think the problems would be.  Do you agree? Absolutely -- but just like anything

Re: [Numpy-discussion] C++ Example

2012-03-06 Thread Chris Barker
On Sun, Mar 4, 2012 at 2:18 PM, Luis Pedro Coelho l...@cmu.edu wrote: At least last time I read up on it, cython was not able to do multi-type code, i.e., have code that works on arrays of multiple types. Does it support it now? The Bottleneck project used some sort of template system to

Re: [Numpy-discussion] Recovering from a STOP ?

2012-03-14 Thread Chris Barker
On Wed, Mar 14, 2012 at 9:25 AM, Pauli Virtanen p...@iki.fi wrote: Or, maybe the whole Fortran stuff can be run in a separate process, so that crashing doesn't matter. That's what I was going to suggest -- even if you can get it not to crash, it may well be in a bad state -- memory leaks, and

Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 66, Issue 61

2012-03-20 Thread Chris Barker
On Tue, Mar 20, 2012 at 5:13 AM, Matthieu Rigal ri...@rapideye.net wrote: In fact, I was hoping to have a less memory and more speed solution. which do often go together, at least for big problems -- pushingm emory around often takes more time than the computation itself. At the end, I am

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

2012-03-20 Thread Chris Barker
Warren et al: On Wed, Mar 7, 2012 at 7:49 AM, Warren Weckesser warren.weckes...@enthought.com wrote: If you are setup with Cython to build extension modules, I am and you don't mind testing an unreleased and experimental reader, and I don't. you can try the text reader that I'm working

Re: [Numpy-discussion] Style for pad implementation in 'pad' namespace or functions under np.lib

2012-03-29 Thread Chris Barker
On Thu, Mar 29, 2012 at 7:55 AM, Tim Cera I think there is also a question of using a prefix pad_xxx for the function names as opposed to pad.xxx. Namespaces are one honking great idea -- let's do more of those! If I had it as pad.mean, pad.median, ...etc. then someone could     from

Re: [Numpy-discussion] subclassing array in c

2012-03-30 Thread Chris Barker
On Fri, Mar 30, 2012 at 10:57 AM, mark florisson markflorisso...@gmail.com wrote: Although the segfault was caused by a bug in NumPy, you should probably also consider using Cython, which can make a lot of this pain and boring stuff go away. Is there a good demo/sample somewhere of an ndarray

Re: [Numpy-discussion] ndarray sub-classing and append function

2012-04-01 Thread Chris Barker
On Sun, Apr 1, 2012 at 8:19 AM, Tom Aldcroft aldcr...@head.cfa.harvard.edu wrote: You might try something like below (untested code, just meant as pointing in the right direction): self.resize(len(self) + len(v1), refcheck=False) self[len(self):] = v1 Setting refcheck=False is potentially

Re: [Numpy-discussion] NumPy EIG much slower than MATLAB EIG

2012-04-02 Thread Chris Barker
On Mon, Apr 2, 2012 at 2:25 AM, Nathaniel Smith n...@pobox.com wrote: To see if this is an effect of numpy using C-order by default instead of Fortran-order, try measuring eig(x.T) instead of eig(x)? Just to be clear, .T re-arranges the strides (Making it Fortran order), butyou'll have to make

Re: [Numpy-discussion] creating/working NumPy-ndarrays in C++

2012-04-03 Thread Chris Barker
On Tue, Apr 3, 2012 at 6:06 AM, Holger Herrlich Hi, I plan to migrate core classes of an application from Python to C++ using SWIG, if you're using SWIG, you may want the numpy.i SWIG interface files, they can be handy. but I probably wouldn't use SWIG, unless: - you are already a SWIG

Re: [Numpy-discussion] creating/working NumPy-ndarrays in C++

2012-04-04 Thread Chris Barker
On Tue, Apr 3, 2012 at 4:45 PM, srean srean.l...@gmail.com wrote: From the sourceforge forum it seems the new Blitz++ is quite competitive with intel fortran in SIMD vectorization as well, which does sound attractive. you could write Blitz++ code, and call it from Cython. That may be a bit

Re: [Numpy-discussion] creating/working NumPy-ndarrays in C++

2012-04-04 Thread Chris Barker
On Wed, Apr 4, 2012 at 12:55 PM, srean srean.l...@gmail.com wrote: One big issue that I had with weave is that it compile on the fly. As a result, it makes for very non-distributable software (requires a compiler and the development headers installed), and leads to problems in the long I do

Re: [Numpy-discussion] MemoryError : with scipy.spatial.distance

2012-04-04 Thread Chris Barker
On Wed, Apr 4, 2012 at 4:17 PM, Abhishek Pratap close to a 900K points using DBSCAN algo. My input is a list of ~900k tuples each having two points (x,y) coordinates. I am converting them to numpy array and passing them to pdist method of scipy.spatial.distance for calculating distance between

Re: [Numpy-discussion] [OFFTOPIC] creating/working NumPy-ndarrays in C++

2012-04-09 Thread Chris Barker
2012/4/8 Hänel Nikolaus Valentin valentin.hae...@epfl.ch : http://www.eos.ubc.ca/research/clouds/software/pythonlibs/num_util/num_util_release2/Readme.html that looks like it hasn't been updated since 2006 -- Id say that makes it a non-starter The new numpy-boost project looks promising, though.

Re: [Numpy-discussion] [OFFTOPIC] creating/working NumPy-ndarrays in C++

2012-04-09 Thread Chris Barker
2012/4/9 Hänel Nikolaus Valentin valentin.hae...@epfl.ch: http://www.eos.ubc.ca/research/clouds/software/pythonlibs/num_util/num_util_release2/Readme.html that looks like it hasn't been updated since 2006 -- Id say that makes it a non-starter Yeah, thats what I thought... Until I found it in

Re: [Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

2012-04-20 Thread Chris Barker
On Fri, Apr 20, 2012 at 11:39 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: Oh, right. I was thinking small as in fits in L2 cache, not small as in a few dozen entries. or even two or three entries. I often use a (2,) or (3,) numpy array to represent an (x,y) point (usually pulled

Re: [Numpy-discussion] NEP mask code and the 1.7 release

2012-04-23 Thread Chris Barker
On Mon, Apr 23, 2012 at 12:57 PM, Nathaniel Smith n...@pobox.com wrote: Right, this part is specifically about ABI compatibility, not API compatibility -- segfaults would only occur for extension libraries that were compiled against one version of numpy and then used with a different version.

Re: [Numpy-discussion] What is consensus anyway

2012-04-23 Thread Chris Barker
On Mon, Apr 23, 2012 at 3:08 PM, Travis Oliphant tra...@continuum.io wrote: Right now we are trying to balance difficult things:  stable releases with experimental development. Perhaps a more formal development release system could help here. IIUC, numpy pretty much has two things: the latest

Re: [Numpy-discussion] What is consensus anyway

2012-04-26 Thread Chris Barker
On Mon, Apr 23, 2012 at 11:18 PM, Ralf Gommers Perhaps a more formal development release system could help here. IIUC, numpy pretty much has two things: This is a good idea - not for development releases but for master. Building nightly/weekly binaries would help more people try out new

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Chris Barker
On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my glorified double*. I'm probably not a representative user.) Actually, I think you are representative of a LOT of users -- it turns,

Re: [Numpy-discussion] fromstring() is slow, no really!

2012-05-17 Thread Chris Barker
Anthony, Thanks for looking into this. A few other notes about fromstring() ( and fromfile() ). Frankly they haven't gotten much love -- they are, as you have seen, less than optimized, and kind of buggy (actually, not really buggy, but not robust in the face of malformed input -- and they give

Re: [Numpy-discussion] assign a float number to a member of integer array always return integer

2012-05-22 Thread Chris Barker
On Tue, May 22, 2012 at 6:33 AM, Chao YUE chaoyue...@gmail.com wrote: Just in case some one didn't know this. Assign a float number to an integer array element will always return integer. right -- numpy arrays are typed -- that's one of the points of them -- you wouldn't want the entire array

Re: [Numpy-discussion] subclassing ndarray subtleties??

2012-05-22 Thread Chris Barker
On Tue, May 22, 2012 at 1:07 PM, Dan Goodman dg.gm...@thesamovar.net wrote: I think it would be useful to have an example of a completely 'correctly' subclassed ndarray that handles all of these issues that people could use as a template when they want to subclass ndarray. I think this is by

[Numpy-discussion] Scientific Software and Web Developer Needed in Seattle, WA

2012-05-30 Thread Chris Barker
/gdns_web/job_search.cfm and search for job ID: 199765 You can also send questions about employment issues to: Susan Bowley: susan.bow...@gdit.com And questions about the nature of the work to: Chris Barker: chris.bar...@noaa.gov -- Christopher Barker, Ph.D. Oceanographer

Re: [Numpy-discussion] better error message possible?

2012-06-01 Thread Chris Barker
On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers ch...@simplistix.co.uk Any reason why this:   import numpy   numpy.zeros(10)[-123] Traceback (most recent call last):   File stdin, line 1, in module IndexError: index out of bounds ...could say this:   numpy.zeros(10)[-123]

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

2012-06-04 Thread Chris Barker
On Mon, Jun 4, 2012 at 9:21 AM, bob tnur bobtnu...@gmail.com wrote: Hello every body. I am new to python. How to remove any row or column of a numpy matrix whose sum is 3. To obtain and save new matrix P with (sum(anyrow)!=3 and sum(anycolumn)!=3 elements. well, one question is -- do you want

Re: [Numpy-discussion] 1D array sorting ascending and descending by fields

2012-06-04 Thread Chris Barker
On Mon, Jun 4, 2012 at 11:10 AM, Patrick Redmond plredm...@gmail.com wrote: Here's how I sorted primarily by field 'a' descending and secondarily by field 'b' ascending: could you multiply the numeric field by -1, sort, then put it back -- somethign like: data *- -1 data_sorted = np.sort(data,

Re: [Numpy-discussion] memory allocation at assignment

2012-06-28 Thread Chris Barker
On Thu, Jun 28, 2012 at 9:06 AM, Pierre Haessig On the other hand, just like srean mentionned, I think I also misused the c[:] = a+b syntax. I feel it's a bit confusing since this way of writing the assignment really feels likes it happens inplace. Good to know it's not the case. well, c is

Re: [Numpy-discussion] dot() function question

2012-06-28 Thread Chris Barker
On Wed, Jun 27, 2012 at 2:38 PM, x.pi...@gmail.com wrote: How how can I perform matrix multiplication of two vectors? (in matlab I do it like a*a') np.outer is a bit cleaner, I suppose, but you can exactly the same thing you do with matlab if a is a column (single column 2-d array): In [40]:

Re: [Numpy-discussion] import numpy performance

2012-07-03 Thread Chris Barker
On Mon, Jul 2, 2012 at 12:17 PM, Andrew Dalke da...@dalkescientific.com wrote: In this email I propose a few changes which I think are minor and which don't really affect the external NumPy API but which I think could improve the import numpy performance by at least 40%. +1 -- I think I

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

2012-07-13 Thread Chris Barker
On Thu, Jul 12, 2012 at 2:32 PM, Chao YUE chaoyue...@gmail.com wrote: numpy ndarray indexing in the function. Like when I call: func(a,'1:3,:,2:4'), it knows I want to retrieve a[1:3,:,2:4], and func(a,'1:3,:,4') for a[1:3,:,4] ect. why do the string packing/unpacking? why not use an

Re: [Numpy-discussion] Istalling Numpy and Scipy on preinstalled Python 2.6 on Mac

2012-07-16 Thread Chris Barker
On Sun, Jul 15, 2012 at 2:51 PM, Pierre GM pgmdevl...@gmail.com wrote: A basic warning, though: you don't want to overwrite Mac OS X's own numpy, ... Which is one of the reasons many of us recommend installing the pyton,org python and leaving Apple's alone. And why the standard numpy/scipy

Re: [Numpy-discussion] Lazy imports again

2012-07-17 Thread Chris Barker
On Mon, Jul 16, 2012 at 2:50 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: Working lazy imports would be useful to have. Ralf is opposed to the idea Note that my being opposed is because the benefits are smaller than the cost. If there was a better reason than shaving a couple of extra

Re: [Numpy-discussion] Lazy imports again

2012-07-17 Thread Chris Barker
On Mon, Jul 16, 2012 at 8:37 PM, Travis Oliphant tra...@continuum.io wrote: --- systems that try to freeze Python programs were particularly annoyed at SciPy's lazy import mechanism. That's ironic to me -- while the solution to a lot of freezing problems is to include everything including the

Re: [Numpy-discussion] numpy.complex

2012-07-20 Thread Chris Barker
On Fri, Jul 20, 2012 at 1:17 PM, OC oc-spa...@laposte.net wrote: numpy.complex is just a reference to the built in complex, so only works on scalars: What is the use of storing the complex() built-in function in the numpy namespace, when it is already accessible from everywhere? for

Re: [Numpy-discussion] question about scipy superpack

2012-08-07 Thread Chris Barker
On Mon, Aug 6, 2012 at 8:51 PM, Tom Krauss thomas.p.kra...@gmail.com wrote: I got a new job, and a new mac book pro on which I just installed Mac OS X 10.8. congrats -- on the job, and on an employer that gets you a mac! I need to run SWIG to generate a shared object from C++ source that

Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

2012-08-07 Thread Chris Barker
On Tue, Aug 7, 2012 at 5:00 AM, Pierre GM pgmdevl...@gmail.com wrote: It's generally considered a very bad idea(™) to install NumPy on a recent OSX system without specifying a destination. By default, the process will try to install on /Library/Frameworks/Python, overwriting the pre-installed

Re: [Numpy-discussion] how to uninstall numpy

2012-08-09 Thread Chris Barker
It depends a bit on how you installed it, but for the most part you should simiply be able to delete the numpy directory in site_packages. -Chris On Thu, Aug 9, 2012 at 1:04 AM, x.pi...@gmail.com wrote: Thanks to everybody. ___ NumPy-Discussion

Re: [Numpy-discussion] 64bit infrastructure

2012-08-20 Thread Chris Barker
On Sun, Aug 19, 2012 at 11:39 AM, Ralf Gommers The problem is that, unlike 32-bit builds, they can't be made with open source compilers on Windows. So unless we're okay with that, Why does it have to be built with open-source compilers? we're building against the python.org python, yes? Which

Re: [Numpy-discussion] 64bit infrastructure

2012-08-20 Thread Chris Barker
, Chris Barker wrote: On Sun, Aug 19, 2012 at 11:39 AM, Ralf Gommers The problem is that, unlike 32-bit builds, they can't be made with open source compilers on Windows. So unless we're okay with that, Why does it have to be built with open-source compilers? we're building against

Re: [Numpy-discussion] installing numpy in jython (in Netbeans)

2012-08-26 Thread Chris Barker
Todd, The short version is: you can't do that. -- Jython uses the JVM, numpy is very, very tied into the CPython runtime. This thread is a bit old, but think still holds: http://stackoverflow.com/questions/3097466/using-numpy-and-cpython-with-jython There is the junumeric project, but it

Re: [Numpy-discussion] installing numpy in jython (in Netbeans)

2012-08-27 Thread Chris Barker
On Sun, Aug 26, 2012 at 8:53 PM, Todd Brunhoff to...@nvr.com wrote: Chris, winpdb is ok, although it is only a graphic debugger, not an ide, emphasis on the 'd'. yup -- I mentioned, that as you seem to like NB -- and I know I try to use the same editor for eveything. But if you want a nice

[Numpy-discussion] config.add_library()

2012-08-29 Thread Chris Barker
Hi folks, I'm working on a package that will contain a bunch of cython extensions, all of which need to link against a pile of C++ code. What I think I need to do is build that C++ as a dynamic library, so I can link everything against it. It would be nice if I could leverage distutils to build

Re: [Numpy-discussion] Regression: in-place operations (possibly intentional)

2012-09-21 Thread Chris Barker
On Thu, Sep 20, 2012 at 2:48 PM, Nathaniel Smith n...@pobox.com wrote: because a += b really should be the same as a = a + b. I don't think that's the case - the inplace operator should be (and are) more than syntactic sugar -- they have a different meaning and use (in fact, I think they

Re: [Numpy-discussion] Regression: in-place operations (possibly intentional)

2012-09-21 Thread Chris Barker
On Fri, Sep 21, 2012 at 10:03 AM, Nathaniel Smith n...@pobox.com wrote: You're right of course. What I meant is that a += b should produce the same result as a[...] = a + b If we change the casting rule for the first one but not the second, though, then these will produce different

Re: [Numpy-discussion] np.array execution path

2012-09-24 Thread Chris Barker
On Sat, Sep 22, 2012 at 1:00 PM, Sebastian Haase seb.ha...@gmail.com wrote: Oh, is this actually documented - I knew that np.array would (by default) only create copies as need ... but I never knew it would - if all fits - even just return the original Python-object... was that a typo? is is

Re: [Numpy-discussion] variable number of columns in loadtxt/genfromtxt

2012-09-25 Thread Chris Barker
On Tue, Sep 25, 2012 at 2:31 AM, Andreas Hilboll li...@hilboll.de wrote: I commonly have to deal with legacy ASCII files, which don't have a constant number of columns. The standard is 10 values per row, but sometimes, there are less columns. loadtxt doesn't support this, and in genfromtext,

Re: [Numpy-discussion] Double-ended queues

2012-09-25 Thread Chris Barker
On Tue, Sep 25, 2012 at 4:31 AM, Sturla Molden stu...@molden.no wrote: Also, instead of writing a linked list, consider collections.deque. A deque is by definition a double-ended queue. It is just waste of time to implement a deque (double-ended queue) and hope it will perform better than

Re: [Numpy-discussion] memory-efficient loadtxt

2012-10-01 Thread Chris Barker
Paul, Nice to see someone working on these issues, but: I'm not sure the problem you are trying to solve -- accumulating in a list is pretty efficient anyway -- not a whole lot overhead. But if you do want to improve that, it may be better to change the accumulating method, rather than doing

Re: [Numpy-discussion] Making numpy sensible: backward compatibility please

2012-10-01 Thread Chris Barker
On Fri, Sep 28, 2012 at 3:11 PM, Charles R Harris charlesr.har...@gmail.com wrote: If the behaviour is not specified and tested, there is no guarantee that it will continue. This is an open-source project - there is no guarantee of ANYTHING. But that being said, the specification and testing

Re: [Numpy-discussion] Making numpy sensible: backward compatibility please

2012-10-01 Thread Chris Barker
On Sat, Sep 29, 2012 at 2:16 AM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: Next time I see you, I owe you a beer for making you cross :). If I curse at you, will I get a beer too? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

Re: [Numpy-discussion] memory-efficient loadtxt

2012-10-03 Thread Chris Barker
On Wed, Oct 3, 2012 at 9:05 AM, Paul Anton Letnes paul.anton.let...@gmail.com wrote: I'm not sure the problem you are trying to solve -- accumulating in a list is pretty efficient anyway -- not a whole lot overhead. Oh, there's significant overhead, since we're not talking of a list - we're

Re: [Numpy-discussion] testing with amd libm/acml

2012-11-07 Thread Chris Barker
On Wed, Nov 7, 2012 at 11:41 AM, Neal Becker ndbeck...@gmail.com wrote: Would you expect numexpr without MKL to give a significant boost? It can, depending on the use case: -- It can remove a lot of uneccessary temporary creation. -- IIUC, it works on blocks of data at a time, and thus can

Re: [Numpy-discussion] testing with amd libm/acml

2012-11-08 Thread Chris Barker
On Thu, Nov 8, 2012 at 2:22 AM, Francesc Alted franc...@continuum.io wrote: -- It can remove a lot of uneccessary temporary creation. Well, the temporaries are still created, but the thing is that, by working with small blocks at a time, these temporaries fit in CPU cache, preventing

Re: [Numpy-discussion] Binary releases

2013-09-16 Thread Chris Barker
On Mon, Sep 16, 2013 at 2:56 AM, Nathaniel Smith n...@pobox.com wrote: Another question is, can we start distributing wheels yet? yes, yes, yes -- though maybe not for the beta testing. wheels will never catch on , or even get debugged if none of us use them. -Chris -- Christopher

Re: [Numpy-discussion] Binary releases

2013-09-16 Thread Chris Barker
On Mon, Sep 16, 2013 at 6:31 AM, William Ray Wing w...@mac.com wrote: If you will forgive an observation from a Mac user and (amateur) developer. I have twice tried to build Numpy from source and both times failed. The problem was that I couldn't find a single comprehensive set of

Re: [Numpy-discussion] Binary releases

2013-09-16 Thread Chris Barker
On Mon, Sep 16, 2013 at 12:15 PM, Peter Cock p.j.a.c...@googlemail.comwrote: Doing that right is important not just for SciPy but for any other downstream package including C code compiled against the NumPy C API (and the people doing this probably will only have access to free compilers).

[Numpy-discussion] Using setuptools develop mode with numpy distutils

2013-09-17 Thread Chris Barker
Hi, I need to use numpy's distutils Extension to build a fortran / f2py extension. But I also really like setuptools' develop mode. However, if I do: from numpy.distutils.core import Extension and use that to define my Extension object, but use: from setuptools import setup And use that for

Re: [Numpy-discussion] Using setuptools develop mode with numpy distutils

2013-09-18 Thread Chris Barker
On Wed, Sep 18, 2013 at 2:20 AM, Robert Kern robert.k...@gmail.com wrote: Just import setuptools before doing the numpy.distutils imports. You don't need to use setuptools.setup() in order to get access to the setuptools-added commands. Thanks --- that works fine -- I could have sworn I

Re: [Numpy-discussion] Equivalent to IDL's help function

2013-10-18 Thread Chris Barker
On Mon, Oct 7, 2013 at 10:15 AM, Siegfried Gonzi sgo...@staffmail.ed.ac.uk wrote: What is the equivalent to IDL its help function, e.g. == IDL a = make_array(23,23,) IDL help,a will result in: A FLOAT = Array[23, 23] am I missing something, or is this what you get when

Re: [Numpy-discussion] OT: How are SVG data converted into curves

2013-10-18 Thread Chris Barker
On Wed, Oct 16, 2013 at 4:23 PM, Daniele Nicolodi dani...@grinta.net wrote: the format is quite clearly documented. For the path data you can see http://www.w3.org/TR/SVG/paths.html. There are several open source libraries that implement SVG rendering, you may look at those to see how the

[Numpy-discussion] official binaries on web page.

2013-10-21 Thread Chris Barker
If you go to numpy.org, and try to figure out how to install numpy, you are most likely to end up here: http://www.scipy.org/install.html where there is no mention of the binaries built by the numpy project itself, either Windows or Mac. There probably should be. -Chris -- Christopher

Re: [Numpy-discussion] official binaries on web page.

2013-10-22 Thread Chris Barker
On Tue, Oct 22, 2013 at 6:07 AM, Pauli Virtanen p...@iki.fi wrote: 22.10.2013 06:29, Chris Barker kirjoitti: If you go to numpy.org, and try to figure out how to install numpy, you are most likely to end up here: http://www.scipy.org/install.html where there is no mention of the binaries

Re: [Numpy-discussion] official binaries on web page.

2013-10-22 Thread Chris Barker
On Tue, Oct 22, 2013 at 9:36 AM, Ralf Gommers ralf.gomm...@gmail.com wrote: You can argue with the exact wording, I won't argue, I'll suggest an alternative in a pull request... but the layout of that page is on purpose. scipy.org is split into two parts: (a) a SciPy Stack part, and (b) a

Re: [Numpy-discussion] official binaries on web page.

2013-10-22 Thread Chris Barker
On Tue, Oct 22, 2013 at 1:44 PM, Chris Barker chris.bar...@noaa.gov wrote: (off to do a pull request) Done. https://github.com/scipy/scipy.org/pull/30 -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand

Re: [Numpy-discussion] official binaries on web page.

2013-10-22 Thread Chris Barker
By the way: On Tue, Oct 22, 2013 at 1:44 PM, Chris Barker chris.bar...@noaa.gov wrote: If you google numpy you get the numpy.org page as the first hit If you go to numpy.org, there is a geting numpy link, that takes you to: http://www.scipy.org/install.html The www.numpy.org page could

Re: [Numpy-discussion] official binaries on web page.

2013-10-22 Thread Chris Barker
On Tue, Oct 22, 2013 at 2:23 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: https://github.com/numpy/numpy.org Agreed that numpy.org is not in great shape. Volunteers welcome I'd say. I just did a pull request to update the Getting Numpy link -- but yes, it needs more than that...someday.

Re: [Numpy-discussion] official binaries on web page.

2013-10-23 Thread Chris Barker
On Wed, Oct 23, 2013 at 11:10 AM, Matthew Brett matthew.br...@gmail.com wrote: I am arguing that whether it's a good idea or not, according to us, is not going affect the guys and gals in Group 2, and that, unless we want to lose or discourage those people, we'll always need to support (and

Re: [Numpy-discussion] official binaries on web page.

2013-10-23 Thread Chris Barker
/scipy.org/pull/32 -Chris On Wed, Oct 23, 2013 at 12:50 PM, Chris Barker chris.bar...@noaa.gov wrote: On Wed, Oct 23, 2013 at 11:10 AM, Matthew Brett matthew.br...@gmail.com wrote: I am arguing that whether it's a good idea or not, according to us, is not going affect the guys and gals

Re: [Numpy-discussion] official binaries on web page.

2013-10-23 Thread Chris Barker
On Wed, Oct 23, 2013 at 1:45 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: I'd be tempted to replace that unreadable link with http://sourceforge.net/projects/scipy/files/scipy/ and not care about pip/easy_install scanning that page. Binary installers don't work anyway and source bundles are

Re: [Numpy-discussion] [Pythonmac-SIG] Building extension modules with Xcode 5

2013-10-25 Thread Chris Barker
Ned, I think this fell off the list (I really don't like when reply is not set to the list...) On Fri, Oct 25, 2013 at 4:33 PM, Ned Deily n...@acm.org wrote: On Oct 25, 2013, at 15:17 , Chris Barker chris.bar...@noaa.gov wrote: On Thu, Oct 24, 2013 at 7:29 PM, Ned Deily n...@acm.org wrote

Re: [Numpy-discussion] memmory management question

2013-10-31 Thread Chris Barker
On Mon, Oct 28, 2013 at 6:25 AM, Pierre Haessig pierre.haes...@crans.orgwrote: a.base In this document, it is mentionned several time that slicing yields views of the original data, but the .base attribute is not mentionned. Should it be or is it out-of-scope of the Indexing guide ?

Re: [Numpy-discussion] Numpy 1.9 release date

2013-11-12 Thread Chris Barker
On Sun, Nov 10, 2013 at 7:27 PM, Stéfan van der Walt ste...@sun.ac.zawrote: that the main thing missing at this point is fixing the datetime problems. What needs to be done, and what is the plan forward? I'm not sure that's quite been decided, but my take: 1) remove the existing time zone

Re: [Numpy-discussion] ANN: Scipy 0.13.1 release

2013-11-18 Thread Chris Barker
On Sun, Nov 17, 2013 at 1:53 AM, Ralf Gommers ralf.gomm...@gmail.comwrote: I'm happy to announce the availability of the scipy 0.13.1 release. This is a bugfix only release; it contains several fixes for issues in ndimage. Thanks to Pauli Virtanen and Ray Jones for fixing these issues quickly.

  1   2   3   4   5   6   >