ant to the main topic of the thread, but FYI I think the
> recarray issues are fixed in 1.10.4.)
>
> On Feb 7, 2016 11:10 PM, "Nadav Horesh" <nad...@visionsense.com> wrote:
>>
>> I have atlas-lapack-base installed via pacman (required by sagemath).
>> Since
The reult tests of numpy 1.10.4 installed from source:
OK (KNOWNFAIL=4, SKIP=6)
I think I use openblas, as it is installed instead the normal blas/cblas.
Nadav,
From: NumPy-Discussion <numpy-discussion-boun...@scipy.org> on behalf of Nadav
n Sun, Feb 7, 2016 at 10:09 PM, Nadav Horesh <nad...@visionsense.com> wrote:
> Thank you fo reminding me, it is OK now:
> $ python -c 'import numpy; print(numpy.__config__.show())'
>
> lapack_opt_info:
> library_dirs = ['/usr/local/lib']
> language = c
> libra
org> on behalf of
Matthew Brett <matthew.br...@gmail.com>
Sent: 08 February 2016 01:33
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Multi-distribution Linux wheels - please test
Hi,
On Sun, Feb 7, 2016 at 2:06 AM, Nadav Horesh <nad...@visionsense.com> wrote:
Test platform: python 3.4.1 on archlinux x86_64
scipy test: OK
OK (KNOWNFAIL=97, SKIP=1626)
numpy tests: Failed on long double and int128 tests, and got one error:
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
oun...@scipy.org> on behalf of Evgeni
Burovski <evgeny.burovs...@gmail.com>
Sent: 04 February 2016 11:42
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] [OT] Interpolation of an unevently sampled
bandwidth limited signal
On Thu, Feb 4, 2016 at 9:32 AM, Nadav
I have several cases of hand digitized spectra that I'd like to resample these
spectra at even spacings. My problem is that cubic or RBF splines often result
in an unacceptible over-shooting. Is there a python module that provides
something similar to sinc interpolation on unevenly space
Harris <charlesr.har...@gmail.com>
Sent: 04 February 2016 17:17
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] [OT] Interpolation of an unevently sampled
bandwidth limited signal
On Thu, Feb 4, 2016 at 4:34 AM, Nadav Horesh
<nad...@visionsense.com<mailto:nad.
Why the dot function/method is slower than @ on python 3.5.1? Tested from the
latest 1.11 maintenance branch.
np.__version__
Out[39]: '1.11.0.dev0+Unknown'
%timeit A @ c
1 loops, best of 3: 185 µs per loop
%timeit A.dot(c)
1000 loops, best of 3: 526 µs per loop
%timeit np.dot(A,c)
Is is possible that recarray are slow again?
Nadav
From: NumPy-Discussion on behalf of
Charles R Harris
Sent: 08 December 2015 03:41
To: numpy-discussion; SciPy Developers List; SciPy Users
The functions dot, matmul and tensordot performs the same on a MxN matrix
multiplied by length N vector, but very different if the matrix is replaced by
a PxQxN array. Why?
In [3]: a = rand(100,3)
In [4]: a1 = a.reshape(1000,1000,3)
In [5]: w = rand(3)
In [6]: %timeit a.dot(w)
100
Subject: Re: [Numpy-discussion] A regression in numpy 1.10: VERY slow memory
mapped file generation
On 10/14/2015 01:23 AM, Nadav Horesh wrote:
>
> I have binary files of size range between few MB to 1GB, which I read process
> as memory mapped files (via np.memmap). Until numpy 1.9 the cre
I have binary files of size range between few MB to 1GB, which I read process
as memory mapped files (via np.memmap). Until numpy 1.9 the creation of
recarray on an existing file (without reading its content) was instantaneous,
and now it takes ~6 seconds (system: archlinux on sandy bridge).
There was an idea on this list to provide a function the run multiple dot on
several vectors/matrices. It seems to be a particular implementation of this
proposed function.
Nadav.
On 22 May 2015 11:58, David Cournapeau courn...@gmail.com wrote:
On Fri, May 22, 2015 at 5:39 PM, Mathieu
Replace
data = data.byteswap()
By
data = data.byteswap()[::-1]
Nadav
On 23 Aug 2014 09:15, Cleo Drakos cleo21dra...@gmail.com wrote:
Hello numpy users:
I have 2d numpy array of 480 rows and 1440 columns as named by 'data' below:
The first element belongs to (49.875S,179.875W),
the
In [1]: import numpy as np
In [2]: a = np.arange(4)
In [3]: np.pad(a,2)
---
ValueError Traceback (most recent call last)
ipython-input-3-f56fe53684b8 in module()
1 np.pad(a,2)
: [Numpy-discussion] numpy 1.9b1 bug in pad function?
Hi Nadav
On Sat, Jun 14, 2014 at 8:11 AM, Nadav Horesh nad...@visionsense.com wrote:
In [4]: np.__version__
Out[4]: '1.9.0b1'
The documentation specify that the mode parameter is optional
I don't see the optional specification
This is what APL's . operator does, and I found it useful from time to time
(but I was much younger then).
Nadav
Jaime Fernández del Río jaime.f...@gmail.com wrote:
The other day I found myself finding trailing edges in binary images doing
something like this:
arr = np.random.randint(2,
I did not try it, but I assume that you can build a stack of diagonal matrices
as a MxNxN array and use tensordot with the matrix v (and it's inverse). The
trivial way to accelerate the loop is to calculate in inverse of v before the
loop.
Nadav
There is an unwrap function in numpy. Doesn't it work for you?
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
on behalf of Neal Becker [ndbeck...@gmail.com]
Sent: 11 January 2013 17:40
To: numpy-discussion@scipy.org
Example:
lib = ctypes.CDLL('libm.dylib')
address_as_integer = ctypes.cast(lib.sin, ctypes.c_void_p).value
Excellent!
Sorry for the hijack, thanks for rhe ride,
Nadav.
___
NumPy-Discussion mailing list
Sorry for being slow.
There is (I think) a related question I raised on the skimage list:
I have a cython function that calls a C callback function in a loop (one call
for each pixel in an image). The C function in compiled in a different shared
library (a simple C library, not a python module).
Do you want a histogramm of z for each (x,y) ?
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of Ruby Stevenson [ruby...@gmail.com]
Sent: 30 January 2012 21:27
To: Discussion of Numerical Python
Subject:
@scipy.org
Subject: Re: [Numpy-discussion] Strange error raised by scipy.special.erf
Le 22/01/2012 11:28, Nadav Horesh a écrit :
special.erf(26.5)
1.0
special.erf(26.6)
Traceback (most recent call last):
File pyshell#7, line 1, in module
special.erf(26.6)
FloatingPointError: underflow
With N.seterr(all='raise'):
from scipy import special
import scipy
special.erf(26.6)
1.0
scipy.__version__
'0.11.0.dev-81dc505'
import numpy as N
N.seterr(all='raise')
{'over': 'warn', 'divide': 'warn', 'invalid': 'warn', 'under': 'ignore'}
special.erf(26.5)
1.0
special.erf(26.6)
im_flat = im0[...,0]*65536 + im[...,1]*256 +im[...,2]
colours = np.unique(im_flat)
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of Tony Yu [tsy...@gmail.com]
Sent: 15 January 2012 18:03
To: Discussion of
What about python3 support?
Thanks
Nadav.
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of Francesc Alted [fal...@gmail.com]
Sent: 08 January 2012 12:49
To: Discussion of Numerical Python; numexpr
Subject:
A quick and dirty cython code is attached
Use:
import Float128
a = Float128.Float128('1E500')
array([ 1e+500], dtype=float128)
or
b = np.float128(1.34) * np.float128(10)**2500
b
1.3400779e+2500
Maybe there is also a way to do it in a pure python code via ctypes?
Nadav
: numpy-discussion-boun...@scipy.org
[mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Nadav Horesh
Sent: Monday, October 24, 2011 9:02 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] neighborhood iterator speed
I found the 2d iterator definition active in numpy 1.6.1. I'll
, 2011 at 6:57 AM, Nadav Horesh nad...@visionsense.com wrote:
I am trying to replace an old code (biliteral filter) that rely on
ndimage.generic_filter with the neighborhood iterator. In the old code, the
generic_filter generates a contiguous copy of the neighborhood, thus the
(cython) code
...@scipy.org] On Behalf Of David Cournapeau
Sent: Monday, October 24, 2011 1:57 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] neighborhood iterator speed
On Mon, Oct 24, 2011 at 10:48 AM, Nadav Horesh nad...@visionsense.com wrote:
* Iterator mode: Mirror. Does the mode make a huge
[mailto:numpy-discussion-boun...@scipy.org] On Behalf Of David Cournapeau
Sent: Monday, October 24, 2011 4:04 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] neighborhood iterator speed
On Mon, Oct 24, 2011 at 1:23 PM, Nadav Horesh nad...@visionsense.com wrote:
* I'll try
of Numerical Python
Subject: Re: [Numpy-discussion] neighborhood iterator speed
On Mon, Oct 24, 2011 at 1:23 PM, Nadav Horesh nad...@visionsense.com wrote:
* I'll try to implement the 2D iterator as far as far as my programming
expertise goes. It might take few days.
I am pretty sure the code
of
iterators. Is there an *easy* way to work with nmpy iterators while the GIL is
released?
Platfoem: numpy 1.6.1 on python 2.7.2 and cython 0.15.1
system: gcc on linux
Nadav# A Cython + Neighbourhood based biliteral filter
# Nadav Horesh
I am trying to replace an old code (biliteral filter) that rely on
ndimage.generic_filter with the neighborhood iterator. In the old code, the
generic_filter generates a contiguous copy of the neighborhood, thus the
(cython) code could use C loop to iterate over the neighbourhood copy. In the
Just in time! I was just working on a cythonic replacement to
ndimage.generic_filter (well, I took a a short two years break in the middle).
thank you very much,
Nadav.
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
Hi,
This is my second post on this problem I found in numpy 1.6.1, and recently it
cam up in the latest git version (2.0.0.dev-f3e70d9). The problem is numpy
treats the native byte order ('') as illegal while the wrong one ('') as the
right one. The output of the attached script (bult for
My system is a 64 bit gentoo linux on core i7 machine. Numpy version 1.6.1 and
pyton(s) 2.7.2 and 3.2.1
Problem summary:
I tried t invert a matrix of explicit little endian byte-order and got an
error. The inversion run properly with a native byte order, and I get a wrong
answer with not
to be OS or processor dependent. Any ideas?
Charanpal
Date: Thu, 11 Aug 2011 07:21:09 -0700
From: Nadav Horesh nad...@visionsense.commailto:nad...@visionsense.com
Subject: Re: [Numpy-discussion] SVD does not converge on clean
matrix
To: Discussion of Numerical Python
numpy-discussion
Had no problem on a gentoo 64 bit machine using atlas 3.8.0 (Core I7, python
2.7.2, numpy versions1.60 and 1.6.1)
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of dhan...@telecom-paristech.fr
The matrix in singular, so you can not expect a stable inverse.
Nadav.
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of jp d [yo...@yahoo.com]
Sent: 11 August 2011 03:50
To: numpy-discussion@scipy.org
Subject:
For lazy data loading I use memory-mapped array (numpy.memmap): I use it to
process multi-image files that are much larger than the available RAM.
Nadav.
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of Craig
For such expressions you should try numexpr package: It allows the same type of
optimisation as Matlab does: run a single loop over the matrix elements
instead of repetitive loops and intermediate objects creation.
Nadav
Besides the matlab/numpy comparison, I think that there is an
I installed numpy-1.6.1-rc3 on python3.2, and used the python3 sphinx port
(version 1.1pre) to compile the documentation and got this error:
nadav@nadav /dev/shm/numpy-1.6.1rc3/doc $ make latex
] Recommndations for an easy GUI
Have a look at glumpy: http://code.google.com/p/glumpy/
It's quite simple and very fast for images (it's based on OpenGL/shaders).
Nicolas
On Jun 28, 2011, at 6:38 AM, Nadav Horesh wrote:
I have an application which generates and displays RGB images as rate
I have an application which generates and displays RGB images as rate of
several frames/seconds (5-15). Currently I use Tkinter+PIL, but I have a
problem that it slows down the rate significantly. I am looking for a fast and
easy alternative.
Platform: Linux
I prefer tools that would work also
Did you try searchsorted?
Nadav
מאת: numpy-discussion-boun...@scipy.org
[mailto:numpy-discussion-boun...@scipy.org] בשם Michael Katz
נשלח: Tuesday, June 21, 2011 10:06
אל: Discussion of Numerical Python
נושא: [Numpy-discussion] faster in1d() for monotonic
Several time I encountered problems in transfering large files between XP
stations on a wireless network. Could be a result of the unsafe UDP prtocol
used by microsoft network protocol (do not have a vista/7 machines to test it).
Nadav
From:
Wikipedia has this link
http://www.pyngl.ucar.edu/Nio.shtml
Does it do the job?
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of dileep kunjaai [dileepkunj...@gmail.com]
Sent: 08 April 2011 15:21
To:
I am looking for a partial least sqaures code refactoring for two (X,Y)
matrices. I found the following, but they not not work for me:
1. MDP: Factors only one matrix (am I wrong?)
2. pychem: Windows only code (I use Linux)
3. chemometrics from Koders: I get a singularity error.
4. pca_module (By
...@scipy.org]
On Behalf Of Gael Varoquaux [gael.varoqu...@normalesup.org]
Sent: 24 March 2011 22:04
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Partial least squares
On Thu, Mar 24, 2011 at 08:15:12PM +0100, Olivier Grisel wrote:
2011/3/24 Nadav Horesh nad...@visionsense.com
]
On Behalf Of Christoph Gohlke [cgoh...@uci.edu]
Sent: 14 March 2011 21:55
To: numpy-discussion@scipy.org
Subject: Re: [Numpy-discussion] [OT] anyimage io module that
works withpython3?
On 3/12/2011 9:56 PM, Nadav Horesh wrote:
This lead to another error probably due
] בשם Stéfan van der Walt
נשלח: Monday, March 14, 2011 00:16
אל: Discussion of Numerical Python
נושא: Re: [Numpy-discussion] [OT] any image io module that works with python3?
Hi Nadav
On Sun, Mar 13, 2011 at 8:20 PM, Nadav Horesh nad...@visionsense.com wrote:
Jest tested the installation (after git
that works with
python3?
On Mon, Mar 14, 2011 at 9:55 AM, Nadav Horesh nad...@visionsense.com wrote:
The instillation is OK. The problem is that on my wok PC I do not have PIL
installed. So:
Thanks, you are right of course: no plugin should be required upon
import. I now put the use_plugin
Jest tested the installation (after git clone ...). I had to correct the
following lines in _build.py to pass installation:
lines 72, and 75 should be:
f0 = open(f0,'br')
f1 = open(f1,'br')
Nadav.
From: numpy-discussion-boun...@scipy.org
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
, then it should be
pretty simple to fix.
Zach
On Mar 12, 2011, at 4:40 AM, Christoph Gohlke wrote:
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
If it doesn't work out of the box on python 3, then it should be
pretty simple to fix.
Zach
On Mar 12, 2011, at 4:40 AM, Christoph Gohlke wrote:
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
Gohlke [cgoh...@uci.edu]
Sent: 12 March 2011 21:49
To: numpy-discussion@scipy.org
Subject: Re: [Numpy-discussion] [OT] any image io module that works with
python3?
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
-boun...@scipy.org]
On Behalf Of Christoph Gohlke [cgoh...@uci.edu]
Sent: 13 March 2011 00:37
To: numpy-discussion@scipy.org
Subject: Re: [Numpy-discussion] [OT] any image io module thatworks
withpython3?
On 3/12/2011 12:47 PM, Nadav Horesh wrote:
After the replacement of ö with o
A brief history:
I wrote the asinh and acosh functions for the math (or was it cmath?) for
python 2.0. It fixed some problems of GVR implementation, but still it was far
from perfect, and replaced shortly after. My 1/4 cent tip: Do not rush ---
find a good code.
Nadav
The C code return the right result with glibc 2.12.2 (linux 64 + gcc 4.52).
However I get the same nan+nan*j with python.
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of Pauli Virtanen [p...@iki.fi]
Do you want to save the file to disk as 100x100 matrices, or just to read them
into the memory?
Are the files in ascii or binary format?
Nadav
From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org]
On Behalf Of Venkat
... Also, IIRC, 1.0 cannot be represented exactly as a float,
Not true
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Matthieu Brucher
Sent: Tue 02-Nov-10 11:05
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Precision difference
You can aid mgrid, riughy as the follows (I may have mistakes, but the
direction should be clear):
def transform_3d_data_(field,lwrbnd,uprbnd):
shape = field.shape
XYZ = np.mgrid[lwrbnd[0]:uprbnd[0]:shape[0], lwrbnd[1]:uprbnd[1]:shape[1],
lwrbnd[2]:uprbnd[2]:shape[2]]
vectors =
Of course there is an (at least one) error:
the line should be:
XYZ =
np.mgrid[lwrbnd[0]:uprbnd[0]:shape[0]*1j,lwrbnd[1]:uprbnd[1]:shape[1]*1j,
lwrbnd[2]:uprbnd[2]:shape[2]*1j]
On Tue, 2010-10-19 at 14:10 +0200, Nadav Horesh wrote:
You can aid mgrid, riughy as the follows (I may have mistakes
You should avoid meshgrid, as the follows:
...
#3D ARRAY
XArray = np.arange(0, NrHorPixels, 1./sqrt(NrCellsPerPixel))
YArray = np.arange(0, NrVerPixels, 1./sqrt(NrCellsPerPixel))
Z =
Amplitude*exp(-(((XArray-GaussianCenterX)**2/(2*SigmaX**2))+((YArray[:,None]-GaussianCenterY)**/(2*SigmaY**2
View 2D arrays:
Most convenient: Matplotlib (imshow)
As surface plot: Mayavi (Matplotlib has surface plots, but it is slow for
large arrays)
Modify files:
I think the IDE spyder could help (and you can use mayavi/matplotlib within)
Nadav
-הודעה מקורית-
מאת:
The following does not raise an error:
a = np.arange(5)
a[a0] = a
although a.shape == (5,) while a[a0].shape == (4,)
I get in on python2.6.5, numpy 1.4.1 on win32, and python 2.6.5, numpy
2.0.0.dev8469 on linux64.
Nadav.
___
NumPy-Discussion
: Re: [Numpy-discussion] A bug in boolean indexing?
On 7/29/2010 4:04 AM, Nadav Horesh wrote:
a = np.arange(5)
a[a0] = a
This has nothing to do with reusing ``a``::
b = np.arange(50)
a[a0] = b
a
array([0, 0, 1, 2, 3])
Note however that reusing
Till now I see that numpy2 plays well with PIL, Matplotlib, scipy and maybe
some other packages. Should I expect that it might break?
Nadav.
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Pauli Virtanen
Sent: Mon 19-Jul-10 10:54
To: Discussion of Numerical
What is the difference between these two versions? I usually check out the svn
version (now 2.0) and it compiles well with python 2.6, 2.7 and 3.1.
Nadav.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
int can be larger than numpy.int64 therefore it should be coerced to float64
(or float96/float128)
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Pearu Peterson
Sent: Sun 13-Jun-10 12:08
To: Discussion of Numerical Python
Subject: [Numpy-discussion]
You can. If each number occupies 2 bytes (16 bits) it is straight forward. If
it is a continues 12 bits stream you have to unpack by your self:
data = np.fromstring(str12bits, dtype=np.uint8)
data1 = data.astype(no.uint16)
data1[::3] = data1[::3]*256 + data1[1::3] // 16
data1[1::3] = (data[1::3]
] Can not compile numpy with python2.7 onllinux
On Sun, May 23, 2010 at 1:40 AM, Nadav Horesh nad...@visionsense.comwrote:
I think that line 3405 in _capi.c (svn 8386)
should be:
#if PY_VERSION_HEX = 0x0301
(At least it looks reasonable considering line 3375, and it solves my
problem
is not executing?
Syntax to the call the C function from Python is the following:
FFMCcalc.FFMCcalc(T,H,W,ro,Fo)
Should this execute the C code?
thanks,
Matt
On Sun, May 23, 2010 at 1:44 AM, Nadav Horesh nad...@visionsense.com wrote:
in test.py change to
print FFMCcalc.FFMCcalc(T,H,W,ro,Fo)
As implied
You can just catch the exception and decide what to do with it:
try:
data = np.loadtxt('foo.txt')
except IOError:
data = 0 # Or something similar
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Maria Liukis
Sent: Tue 25-May-10 01:14
To:
in test.py change to
print FFMCcalc.FFMCcalc(T,H,W,ro,Fo)
As implied from the line
print FFMCcalc.FFMCcalc.__doc__
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Matt Fearon
Sent: Fri 21-May-10 21:55
To: numpy-discussion@scipy.org
Subject:
Is a memory mapped file is a viable solution to your problem?
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Jean-Baptiste Rudant
Sent: Mon 17-May-10 14:03
To: Numpy Discussion
Subject: [Numpy-discussion] Saving an array on disk to free memory -
in module npyio.py lines 794,796 file should be replaced by _file
Nadav
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
import numpy as N
N.repeat(N.arange(len(a)), a)
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Peter Shinners
Sent: Thu 15-Apr-10 08:30
To: Discussion of Numerical Python
Subject: [Numpy-discussion] Need faster equivalent to digitize
I am using
I assume that you forgot to specify the range between 300 and 400. But anyway
this piece of code may give you a direction:
--
import numpy as np
ythreshold = np.repeat(np.arange(4,-1,-1), 100) * 20 +190
bin_image = image ythreshold[:,None]
Is there a way to get the file-name given a memmap array object?
Nadav
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Tried of install numy-1.4.1-rc2 on python-2.7b1 and got an error:
(64 bit linux on core2, gcc4.4.3)
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
-Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
-Inumpy/core/include
rraywithmultiprocessing.Pool.applay_async
On Sat, Apr 3, 2010 at 22:35, Nadav Horesh nad...@visionsense.com wrote:
Got it, thank you.
But why, nevertheless, the results are correct although the pickling is
impossible?
Rather, I meant that they don't pickle correctly. They use ndarray's
pickling, which will copy
The following script generate the following error on every loop iteration in
the function average:
Exception AttributeError: AttributeError('NoneType' object has no attribute
'tell',) in bound method memmap.__del__ of memmap(xx) ignored
where xx is a scalar (the array sum).
I get
-discussion] Annoyance of memap rray
withmultiprocessing.Pool.applay_async
On Sat, Apr 3, 2010 at 14:29, Nadav Horesh nad...@visionsense.com wrote:
The following script generate the following error on every loop iteration in
the function average:
Exception AttributeError: AttributeError('NoneType
In python empty sequences are always equivalent to False, and non-empty to
True. You can use this property or:
if len(b) 0:
.
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Shailendra
Sent: Fri 02-Apr-10 06:07
To: numpy-discussion@scipy.org
The general guideline:
Suppose the function definition is:
def func(x,y):
# x and y are scalars
bla bla bla ...
return z # a scalar
So,
import numpy as np
vecfun = np.vectorize(func)
vecfun.ufunc.accumulate(array((0,1,2,3,4,5,6,7,8,9))
Nadav.
-Original Message-
Any idea why
from .io import StringIO
and not
from io import StringIO
???
(Why is the extra . before io)
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Bruce Southey
Sent: Wed 24-Mar-10 16:17
To: Discussion of Numerical Python
Subject:
Here is a strange thing I am getting with multiprocessing and memory mapped
array:
The below script generates the error message 30 times (for every slice access):
Exception AttributeError: AttributeError('NoneType' object has no attribute
'tell',) in bound method memmap.__del__ of
codes.
+1
Thanks for emphasizing this. This is definitely a big issue with multicore.
Cheers,
Brian
Thanks for sharing your experience anyway,
Francesc
A Thursday 04 March 2010 18:54:09 Nadav Horesh escrigué:
I can not give a reliable answer yet, since I have some more improvement
Maybe the attached file can help. Adpted and tested on amd64 linux
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Nadav Horesh
Sent: Thu 04-Mar-10 10:54
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] multiprocessing shared arrays
...@scipy.org on behalf of Nadav Horesh
Sent: Thu 04-Mar-10 11:55
To: Discussion of Numerical Python
Subject: RE: [Numpy-discussion] multiprocessing shared arrays and numpy
Maybe the attached file can help. Adpted and tested on amd64 linux
Nadav
-Original Message-
From: numpy-discussion-boun
: [Numpy-discussion] multiprocessing shared arrays and numpy
What kind of calculations are you doing with this module? Can you please send
some examples and the speed-ups you are getting?
Thanks,
Francesc
A Thursday 04 March 2010 14:06:34 Nadav Horesh escrigué:
Extended module that I used
There is a work by Sturla Molden: look for multiprocessing-tutorial.pdf
and sharedmem-feb13-2009.zip. The tutorial includes what is dropped in
the cookbook page. I am into the same issue and going to test it today.
Nadav
On Wed, 2010-03-03 at 15:31 +0100, Jesper Larsen wrote:
Hi people,
I
$ python isinf.py
Warning: invalid value encountered in isinf
True
machine: gentoo linux on amd64
python 2.6.4 (64 bit)
gcc 4.3.4
numpy.__version__ == '1.4.0'
glibc 2.10.1
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Charles R Harris
Sent: Sun
There is a possibility to export the data to excel format and use xlrd or
similar package to read it.
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of Manuel Wittchen
Sent: Tue 05-Jan-10 23:14
To: Discussion of Numerical Python
Subject:
You probably have to use the generic interpolation function from
scipy.interpolate module:
scipy.interpolate.splprep, scipy.interpolate.splev, etc.
It could be cumbersome but doable.
Nadav
-Original Message-
From: numpy-discussion-boun...@scipy.org on behalf of reckoner
Sent: Wed
The 2nd line of the doc string
randn([d1, ..., dn])
should be
randn(d1, ..., dn)
Nadav
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
1 - 100 of 219 matches
Mail list logo