Hey,
I just created a pull request: https://github.com/numpy/numpy/pull/5874
Best,
Stefan
On Tue, May 12, 2015 at 3:29 PM Stefan Otte stefan.o...@gmail.com wrote:
Hey,
here is an ipython notebook with benchmarks of all implementations (scroll
to the bottom for plots):
Hello,
indeed I was looking for the cartesian product.
I timed the two stackoverflow answers and the winner is not quite as clear:
n_elements:10 cartesian 0.00427 cartesian2 0.00172
n_elements: 100 cartesian 0.02758 cartesian2 0.01044
n_elements: 1000 cartesian 0.97628 cartesian2
I'm totally in favor of the 'gridspace(linspaces)' version, as you probably end
up wanting to create grids of other things than linspaces (e.g. a logspace grid,
or a grid of random points etc.).
It should be called somewhat different though. Maybe 'cartesian(arrays)'?
Best,
Johannes
Quoting
On Tue, May 12, 2015 at 1:17 AM, Stefan Otte stefan.o...@gmail.com wrote:
Hello,
indeed I was looking for the cartesian product.
I timed the two stackoverflow answers and the winner is not quite as clear:
n_elements:10 cartesian 0.00427 cartesian2 0.00172
n_elements: 100
Hey,
here is an ipython notebook with benchmarks of all implementations (scroll
to the bottom for plots):
https://github.com/sotte/ipynb_snippets/blob/master/2015-05%20gridspace%20-%20cartesian.ipynb
Overall, Jaime's version is the fastest.
On Tue, May 12, 2015 at 2:01 PM Jaime Fernández
On Sun, May 10, 2015 at 4:40 AM, Stefan Otte stefan.o...@gmail.com wrote:
Hey,
quite often I want to evaluate a function on a grid in a n-D space.
What I end up doing (and what I really dislike) looks something like this:
x = np.linspace(0, 5, 20)
M1, M2 = np.meshgrid(x, x)
X =
On Sun, May 10, 2015 at 4:40 AM, Stefan Otte stefan.o...@gmail.com wrote:
Hey,
quite often I want to evaluate a function on a grid in a n-D space.
What I end up doing (and what I really dislike) looks something like this:
x = np.linspace(0, 5, 20)
M1, M2 = np.meshgrid(x, x)
X =
On 2015-05-10 14:46:12, Jaime Fernández del Río
jaime.f...@gmail.com wrote:
Isn't what you are trying to build a cartesian product function?
There is a neat, efficient implementation of such a function in
StackOverflow, by our own pv.:
I just drafted different versions of the `gridspace` function:
https://tmp23.tmpnb.org/user/1waoqQ8PJBJ7/notebooks/2015-05%20gridspace.ipynb
Beste Grüße,
Stefan
On Sun, May 10, 2015 at 1:40 PM, Stefan Otte stefan.o...@gmail.com wrote:
Hey,
quite often I want to evaluate a function on a
On Sun, May 10, 2015 at 7:05 AM, Stefan Otte stefan.o...@gmail.com wrote:
I just drafted different versions of the `gridspace` function:
https://tmp23.tmpnb.org/user/1waoqQ8PJBJ7/notebooks/2015-05%20gridspace.ipynb
The link seems to be broken...
Jaime
--
(\__/)
( O.o)
( ) Este es Conejo.
10 matches
Mail list logo