Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Nadav Horesh
This lead to another error probably due to line 68 in map.h. As much as I could trace it, ob_type is a member of PyObject, not of PyTypeObject. I have no clue how to resolve this. Nadav. From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun

Re: [Numpy-discussion] Not importing polynomial implementation functions by default

2011-03-12 Thread David Warde-Farley
On 2011-03-12, at 9:32 PM, Charles R Harris wrote: > I'd like to change the polynomial package to only import the Classes, leaving > the large number of implementation functions to be imported directly from the > different modules if needed. I always regarded those functions as > implementatio

[Numpy-discussion] Call for GSoC 2011 NumPy mentors

2011-03-12 Thread Jarrod Millman
Hi, It is time to start preparing for the 2011 Google Summer of Code (SoC). As in the past, we will participate in SoC with the Python Software Foundation (PSF) as our mentoring organization. The PSF has requested that every project, which wishes to participate in the SoC, provide a list of at l

[Numpy-discussion] Not importing polynomial implementation functions by default

2011-03-12 Thread Charles R Harris
Hi All, I'd like to change the polynomial package to only import the Classes, leaving the large number of implementation functions to be imported directly from the different modules if needed. I always regarded those functions as implementation helpers and kept them separate from the class so that

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Christoph Gohlke
On 3/12/2011 12:47 PM, Nadav Horesh wrote: > After the replacement of ö with o, the installation went without errors, but: > > nadav@nadav_home ~ $ python3 > Python 3.1.3 (r313:86834, Feb 25 2011, 11:08:33) > [GCC 4.4.4] on linux2 > Type "help", "copyright", "credits" or "license" for more infor

[Numpy-discussion] import error after compiling from HEAD

2011-03-12 Thread Joshua Holbrook
Sup y'all, I just installed numpy from github, but when I tried to import it I got some odd errors! What's going on, and how can it be fixed? josh@pidgey:~$ python -c 'import numpy; numpy.test()' Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.6/dist-pack

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Nadav Horesh
After the replacement of ö with o, the installation went without errors, but: nadav@nadav_home ~ $ python3 Python 3.1.3 (r313:86834, Feb 25 2011, 11:08:33) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import _imaging Traceback (most recent call

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Nadav Horesh
It started to work after processing it with 2to3 and omitting the conversion of file names with the str function (I supply the file names as "bytes"). Issues: 1. It refuses to save in jpeg format 2. There is a worning of possible segfult on 64 bit machine (which is the target platform). I'll

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Christoph Gohlke
On 3/12/2011 8:45 AM, Nadav Horesh wrote: > I forgot to mention that I work on linux (gentoo x86-64).Here are my > achievements till now: > > 1. PythonMagick: Needs boost which I do not have it avaiable on python3 Boost works on Python 3.1. You might need to compile it. > 2. Pygame: I have the s

Re: [Numpy-discussion] Inplace remove some array rows

2011-03-12 Thread David Warde-Farley
On 2011-03-12, at 12:43 PM, Dmitrey wrote: > hi all, > currently I use > a = array(m,n) > ... > a = delete(a, indices, 0) # delete some rows > > Can I somehow perform the operation in-place, without creating auxiliary > array? > If I'll use > > numpy.compress(condition, a, axis=0, out=a), > or

[Numpy-discussion] Inplace remove some array rows

2011-03-12 Thread Dmitrey
hi all, currently I use a = array(m,n) ... a = delete(a, indices, 0) # delete some rows Can I somehow perform the operation in-place, without creating auxiliary array? If I'll use numpy.compress(condition, a, axis=0, out=a), or numpy.take(a, indices, axis=0, out=a)

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Nadav Horesh
I forgot to mention that I work on linux (gentoo x86-64).Here are my achievements till now: 1. PythonMagick: Needs boost which I do not have it avaiable on python3 2. Pygame: I have the stable version(1.9.1) should it work? 3. FreeImage: I installed FreeImagePy on python3, but it doesn't work yet

Re: [Numpy-discussion] assert_almost_equal bug?

2011-03-12 Thread Keith Goodman
On Sat, Mar 12, 2011 at 4:16 AM, Ralf Gommers wrote: > On Sat, Mar 12, 2011 at 12:10 AM, Keith Goodman wrote: >> assert_almost_equal() and assert_array_almost_equal() raise a >> ValueError instead of an AssertionError when the array contains >> np.inf: > > That's a bug, is fixed in 45269ee1. asse

Re: [Numpy-discussion] Using ndpointer with ctypes argtypes

2011-03-12 Thread Josh Mayer
I found a solution that works. What I did was I wrote a custom class to define the argtypes. The from_param(obj) method calls ndpointer when it is a numpy array or if obj is none it returns a null pointer. On Fri, Mar 11, 2011 at 1:25 PM, Josh Mayer wrote: > I am trying to call a C function that

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Zachary Pincus
Here's a ctypes interface to FreeImage that I wrote a while back and was since cleaned up (and maintained) by the scikits.image folk: https://github.com/stefanv/scikits.image/blob/master/scikits/image/io/_plugins/freeimage_plugin.py If it doesn't work out of the box on python 3, then it should

Re: [Numpy-discussion] Structured array copying by field name (was: Numpy 1.6 schedule)

2011-03-12 Thread Ralf Gommers
On Sat, Mar 12, 2011 at 6:51 AM, Benjamin Root wrote: > > > On Fri, Mar 11, 2011 at 2:20 PM, Mark Wiebe wrote: >> >> On Fri, Mar 11, 2011 at 1:07 AM, Ralf Gommers >> wrote: >>> >>> On Tue, Mar 8, 2011 at 1:35 AM, Pauli Virtanen wrote: >>> > >>> > Structured array copying copies by field name. >

Re: [Numpy-discussion] assert_almost_equal bug?

2011-03-12 Thread Ralf Gommers
On Sat, Mar 12, 2011 at 12:10 AM, Keith Goodman wrote: > assert_almost_equal() and assert_array_almost_equal() raise a > ValueError instead of an AssertionError when the array contains > np.inf: That's a bug, is fixed in 45269ee1. assert_array_compare was checking for nans but not for infs. Chee

Re: [Numpy-discussion] how to compile Fortran using setup.py

2011-03-12 Thread David Cournapeau
On Fri, Mar 11, 2011 at 1:57 AM, Ondrej Certik wrote: > On Thu, Mar 10, 2011 at 8:25 PM, Robert Kern wrote: >> On Thu, Mar 10, 2011 at 19:58, Ondrej Certik wrote: >>> Hi, >>> >>> I spent about an hour googling and didn't figure this out. Here is my >>> setup.py: >>> >>> setup( >>>    name = "li

Re: [Numpy-discussion] how to compile Fortran using setup.py

2011-03-12 Thread Pearu Peterson
On Fri, Mar 11, 2011 at 3:58 AM, Ondrej Certik wrote: > Hi, > > I spent about an hour googling and didn't figure this out. Here is my > setup.py: > > setup( >name = "libqsnake", >cmdclass = {'build_ext': build_ext}, >version = "0.1", >packages = [ >'qsnake', >'qsna

Re: [Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Christoph Gohlke
On 3/12/2011 1:08 AM, Nadav Horesh wrote: > Having numpy, scipy, and matplotlib working reasonably with python3, a > major piece of code I miss for a major python3 migration is an image IO. > I found that pylab's imread works fine for png image, but I need to read > all the other image format as

[Numpy-discussion] [OT] any image io module that works with python3?

2011-03-12 Thread Nadav Horesh
Having numpy, scipy, and matplotlib working reasonably with python3, a major piece of code I miss for a major python3 migration is an image IO. I found that pylab's imread works fine for png image, but I need to read all the other image format as well as png and jpeg output. Any hints (includi

Re: [Numpy-discussion] ragged array implimentation

2011-03-12 Thread Christopher Barker
Francesc Alted wrote: > Just a C pointer to a malloc'ed area (it cannot be an ndarray, as the > data area might be compressed). got it. > Ok. Thanks. The code is really simple, and that's great. However, > carray is quite more sophisticated, as it supports not only enlarging > arrays, but a