Hi,
I was wondering if I can concatenate 3 arrays, where the result will be a view
of the original three arrays, instead of a copy of the data. For example,
suppose I write the following
import numpy as n
a = n.array([[1,2],[3,4]])
b = n.array([[5,6],[7,8]])
c = n.array([[9,10],[11,12]])
c =
Hanno Klemm wrote:
I the following problem: I have a relatively long array of points
[(x0,y0), (x1,y1), ...]. Apparently, I have some duplicate entries, which
prevents the Delaunay triangulation algorithm from completing its task.
Question, is there an efficent way, of getting rid of the
Hanno Klemm wrote:
Hi,
I the following problem: I have a relatively long array of points
[(x0,y0), (x1,y1), ...]. Apparently, I have some duplicate entries, which
prevents the Delaunay triangulation algorithm from completing its task.
Question, is there an efficent way, of getting rid of
On Mon, Dec 15, 2008 at 10:27, Hanno Klemm kl...@phys.ethz.ch wrote:
Hi,
I the following problem: I have a relatively long array of points
[(x0,y0), (x1,y1), ...]. Apparently, I have some duplicate entries, which
prevents the Delaunay triangulation algorithm from completing its task.
On Mon, Dec 15, 2008 at 11:39, Benjamin Haynor bhay...@hotmail.com wrote:
Hi,
I was wondering if I can concatenate 3 arrays, where the result will be a
view of the original three arrays, instead of a copy of the data.
No, this is not possible in general with numpy's memory model.
--
Robert
2008/12/15 Benjamin Haynor bhay...@hotmail.com:
I was wondering if I can concatenate 3 arrays, where the result will be a
view of the original three arrays, instead of a copy of the data. For
example, suppose I write the following
import numpy as n
a = n.array([[1,2],[3,4]])
b =
According to wikipedia [1], some common Mersenne twister algorithms
use a linear congruential gradient (LCG) to generate seeds. LCGs have
been known to produce poor random numbers. Does numpy's Mersenne
twister do this? And if so, is this potentially a problem?
On Mon, Dec 15, 2008 at 6:01 PM, Michael Gilbert
michael.s.gilb...@gmail.com wrote:
According to wikipedia [1], some common Mersenne twister algorithms
use a linear congruential gradient (LCG) to generate seeds. LCGs have
been known to produce poor random numbers. Does numpy's Mersenne
On Monday 15 December 2008 18:01:41 Michael Gilbert wrote:
According to wikipedia [1], some common Mersenne twister algorithms
use a linear congruential gradient (LCG) to generate seeds. LCGs have
been known to produce poor random numbers. Does numpy's Mersenne
twister do this? And if so,
On 12/15/2008 6:01 PM Michael Gilbert apparently wrote:
According to wikipedia [1], some common Mersenne twister algorithms
use a linear congruential gradient (LCG) to generate seeds. LCGs have
been known to produce poor random numbers. Does numpy's Mersenne
twister do this? And if so, is
How about a solution inspired by recipe 18.1 in the Python Cookbook,
2nd Ed:
import numpy as np
a = [(x0,y0), (x1,y1), ...]
l = a.tolist()
l.sort()
unique = [x for i, x in enumerate(l) if not i or x != b[l-1]]
a_unique = np.asarray(unique)
Performance of this approach should be highly scalable.
Whoops! A hasty cut-and-paste from my IDLE session.
This should read:
import numpy as np
a = [(x0,y0), (x1,y1), ...] # A numpy array, but could be a list
l = a.tolist()
l.sort()
unique = [x for i, x in enumerate(l) if not i or x != l[i-1]] #
a_unique = np.asarray(unique)
Daran
--
On Dec
On Mon, Dec 15, 2008 at 18:24, Daran Rife dr...@ucar.edu wrote:
How about a solution inspired by recipe 18.1 in the Python Cookbook,
2nd Ed:
import numpy as np
a = [(x0,y0), (x1,y1), ...]
l = a.tolist()
l.sort()
unique = [x for i, x in enumerate(l) if not i or x != b[l-1]]
a_unique =
On Mon, Dec 15, 2008 at 9:21 PM, Alan G Isaac ais...@american.edu wrote:
On 12/15/2008 7:53 PM Robert Kern apparently wrote:
That basic idea is what unique1d() does; however, it uses numpy
primitives to keep the heavy lifting in C instead of Python.
I noticed that unique1d is not documented
On Mon, Dec 15, 2008 at 9:21 PM, Alan G Isaac wrote:
I noticed that unique1d is not documented on the
Numpy Example List http://www.scipy.org/Numpy_Example_List
but is documented on the Numpy Example List with Doc
http://www.scipy.org/Numpy_Example_List_With_Doc
I thought the latter was
On Mon, Dec 15, 2008 at 10:18 PM, Alan G Isaac ais...@american.edu wrote:
On Mon, Dec 15, 2008 at 9:21 PM, Alan G Isaac wrote:
I noticed that unique1d is not documented on the
Numpy Example List http://www.scipy.org/Numpy_Example_List
but is documented on the Numpy Example List with Doc
On Mon, Dec 15, 2008 at 8:37 PM, josef.p...@gmail.com wrote:
What's the future of the example list, on the example list with docs
it says Numpy 1.0.4. It hasn't been updated in a while. When I started
out with numpy, I used it as a main reference, but now, some examples,
that I wanted to look
17 matches
Mail list logo