Re: [Numpy-discussion] delete pixel from the raster image with specific range value

2016-10-08 Thread Elliot Hallmark
What do you mean delete? Set to zero or NaN? You want an (N-1) dimensional array of all the acceptable values from the N dimensional array? Elliot On Oct 8, 2016 5:11 PM, "Xristos Xristoou" wrote: > any idea how to delete pixel from the raster image with > specific range value using numpy/scipy

Re: [Numpy-discussion] Cross-correlation PR stuck in limbo

2016-05-27 Thread Elliot Hallmark
+1 This would really help with large data sets in certain situations. Is there still disagreement about whether this should be included? Or are there some minor details still? Or just lost in the shuffle? Hopefully, Elliot On Wed, May 4, 2016 at 7:07 AM, Pierre Haessig wrote: > Hi, > > I do

[Numpy-discussion] A numpy based Entity-Component-System

2016-05-20 Thread Elliot Hallmark
I have a Data Oriented programing library I'm writing that uses the Entity-Component-System model. https://github.com/Permafacture/data-oriented-pyglet I have initially called it Numpy-ECS but I don't know if that name is okay. The numpy license says: Neither the name of the NumPy Developers no

Re: [Numpy-discussion] Remove a random sample from array

2016-05-16 Thread Elliot Hallmark
Use `random.shuffle(range(len(arr))` to make a list of indices. Use a slices to get your 20/80. Convert to integer arrays and index your original array with them. Use sorted on the 80% list if you need to preserve the order. -Elliot On Mon, May 16, 2016 at 11:04 AM, Martin Noblia < martin.nob.

Re: [Numpy-discussion] Remove a random sample from array

2016-05-16 Thread Elliot Hallmark
What do you mean remove them from the array? Replace with zero or NaN? On May 16, 2016 9:08 AM, "Florian Lindner" wrote: > Hello, > > I have an array of shape (n, 2) from which I want to extract a random > sample > of 20% of rows. The choosen samples should be removed the original array > and > m

Re: [Numpy-discussion] Why is this old bug still present?

2016-05-15 Thread Elliot Hallmark
Thanks! Man, I got every one of those numbers in the wrong place... ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Why is this old bug still present?

2016-05-14 Thread Elliot Hallmark
Sorry for the noob question. On numpy 10.4.1, I am bit by this: https://github.com/numpy/numpy/issues/4185 But it has been fixed 6 months ago: https://github.com/numpy/numpy/issues/6740 Do I need to compile numpy to get this fix on debian sid? Would anaconda be up to date enough? Elliot __

Re: [Numpy-discussion] Numpy arrays shareable among related processes (PR #7533)

2016-05-11 Thread Elliot Hallmark
Strula, this sounds brilliant! To be clear, you're talking about serializing the numpy array and reconstructing it in a way that's faster than pickle? Or using shared memory and signaling array creation around that shared memory rather than using pickle? For what it's worth, I have used shared me

Re: [Numpy-discussion] Is this a known error in Ipython with numpy?

2016-04-27 Thread Elliot Hallmark
Hey Alex. Thanks. I was aware of that. However, I was simply doing `run myscript.py` on the first input line of the Ipython shell, so I did not expect this behaviour. The ipython list would be a better place to ask I guess, since the behaviour on numpy's part is to be expected. Just wondering if a

[Numpy-discussion] Is this a known error in Ipython with numpy?

2016-04-27 Thread Elliot Hallmark
Hello, I haven't worked hard yet to create a minimal runnable (reproduce-able) example but I wanted to check if this sounds familiar to anyone. I have a pretty involved program that resizes arrays in place with arr.resize. When I run it with python it completes and gives the expected result. Wh

Re: [Numpy-discussion] GSoC?

2016-02-08 Thread Elliot Hallmark
Is there a clean way of importing existing C code as a vectorized numpy func? Like, it would be awesome to use gdal in a vectorized way just with ctypes or something. Just something I've dreamed of that I thought I'd ask about in regards to the GSoC. Elliot On Feb 8, 2016 6:03 PM, "Chris Barker"

Re: [Numpy-discussion] resizeable arrays using shared memory?

2016-02-07 Thread Elliot Hallmark
o bad. It would be nice if the array could be resized, but it's probably unstable to do so and there isn't much demand for it. Thanks, Elliot On Sat, Feb 6, 2016 at 8:01 PM, Sebastian Berg wrote: > On Sa, 2016-02-06 at 16:56 -0600, Elliot Hallmark wrote: > > Hi all, >

[Numpy-discussion] resizeable arrays using shared memory?

2016-02-06 Thread Elliot Hallmark
Hi all, I have a program that uses resize-able arrays. I already over-provision the arrays and use slices, but every now and then the data outgrows that array and it needs to be resized. Now, I would like to have these arrays shared between processes spawned via multiprocessing (for fast interpr

Re: [Numpy-discussion] Fast vectorized arithmetic with ~32 significant digits under Numpy

2015-12-12 Thread Elliot Hallmark
> What does "true vectorization" mean anyway? Calling python functions on python objects in a for loop is not really vectorized. It's much slower than people intend when they use numpy. Elliot ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.or

Re: [Numpy-discussion] array of random numbers fails to construct

2015-12-07 Thread Elliot Hallmark
David, >I'm concluding that the .astype(np.uint8) is applied after the array is constructed, instead of during the process. That is how python works in general. astype is a method of an array, so randint needs to return the array before there is something with an astype method to call. A dtype

Re: [Numpy-discussion] Recognizing a cycle in a vector

2015-11-26 Thread Elliot Hallmark
Fast fourier transform (fft)? On Nov 26, 2015 9:21 AM, "Manolo Martínez" wrote: > Dear all, > > Suppose that I have a vector with the numerical solution of a > differential equation -- more concretely, I am working with evolutionary > game theory models, and the solutions are frequencies of types

Re: [Numpy-discussion] I can't tell if Numpy is configured properly with show_config()

2015-06-20 Thread Elliot Hallmark
>What numpy version? 1.8.1 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] I can't tell if Numpy is configured properly with show_config()

2015-06-20 Thread Elliot Hallmark
Sebastian, in the slow virtual-env, _dotblas.so isn't there. I only have _dummy.so On Sat, Jun 20, 2015 at 3:02 PM, Elliot Hallmark wrote: > Well, here is the question that started this all. In the slow > environment, blas seems to be there and work well, but numpy doesn't use

Re: [Numpy-discussion] I can't tell if Numpy is configured properly with show_config()

2015-06-20 Thread Elliot Hallmark
un 20, 2015 at 4:09 AM, Sebastian Berg wrote: > On Fr, 2015-06-19 at 16:19 -0500, Elliot Hallmark wrote: > > Debian Sid, 64-bit. I was trying to fix the problem of np.dot running > > very slow. > > > > > > I ended up uninstalling numpy, installing libatlas3-base throu

[Numpy-discussion] I can't tell if Numpy is configured properly with show_config()

2015-06-19 Thread Elliot Hallmark
Debian Sid, 64-bit. I was trying to fix the problem of np.dot running very slow. I ended up uninstalling numpy, installing libatlas3-base through apt-get and re-installing numpy. The performance of dot is greatly improved! But I can't tell from any other method whether numpy is set up correctly