On Wed, Dec 30, 2015 at 6:34 AM, Nicolas P. Rougier <
nicolas.roug...@inria.fr> wrote:
>
> > On 28 Dec 2015, at 19:58, Chris Barker wrote:
> >
> > >>> python benchmark.py
> > Python list, append 10 items: 0.01161
> > Array list, append 10 items: 0.46854
> >
> > are you pre-allocating any
> On 28 Dec 2015, at 19:58, Chris Barker wrote:
>
> On Wed, Dec 23, 2015 at 4:01 AM, Nicolas P. Rougier
> wrote:
> But my implementation is quite slow, especially when you add one item at a
> time:
>
> >>> python benchmark.py
> Python list, append 10 items: 0.01161
> Array list, append 1
On Wed, Dec 23, 2015 at 4:01 AM, Nicolas P. Rougier <
nicolas.roug...@inria.fr> wrote:
> But my implementation is quite slow, especially when you add one item at a
> time:
>
> >>> python benchmark.py
> Python list, append 10 items: 0.01161
> Array list, append 10 items: 0.46854
>
are you
On Thu, Dec 24, 2015 at 10:19 AM, Chris Barker
wrote:
> I'll try to get the code up on gitHub.
>
Hey look -- it's already there:
https://github.com/PythonCHB/NumpyExtras
too many gitHub accounts.
Here is the list/growable array/ accumulator:
https://github.com/PythonCHB/NumpyExtras/blob/
On Wed, Dec 23, 2015 at 4:01 AM, Nicolas P. Rougier <
nicolas.roug...@inria.fr> wrote:
>
> Typed list in numpy would be a nice addition indeed and your cython
> implementation is nice (and small).
>
It seems we have a lot of duplicated effort here. Pernonally, I have two
needs:
1) ragged arrays
2
On Wed, Dec 23, 2015 at 4:31 AM, Sebastian Berg
wrote:
>
> Probably is a bit orthogonal since I guess you want/need cython, but
> pythons builtin array.array should get you there pretty much as well.
I don't think it's orthogonal to cython -- you can access an array.array
directly from within c
On Mi, 2015-12-23 at 00:34 -0800, Stephan Hoyer wrote:
> We have a type similar to this (a typed list) internally in pandas,
> although it is restricted to a single dimension and far from feature
> complete -- it only has .append and a .to_array() method for
> converting to a 1d numpy array. Our ve
Typed list in numpy would be a nice addition indeed and your cython
implementation is nice (and small).
In my case I need to ensure a contiguous storage to allow easy upload onto the
GPU.
But my implementation is quite slow, especially when you add one item at a time:
>>> python benchmark.py
P
We have a type similar to this (a typed list) internally in pandas, although it
is restricted to a single dimension and far from feature complete -- it only
has .append and a .to_array() method for converting to a 1d numpy array. Our
version is written in Cython, and we use it for performance re
Yes, you can append/insert/remove items.
It works pretty much like a python list in fact (but with a single data type
for all elements).
Nicolas
> On 22 Dec 2015, at 20:19, Chris Barker wrote:
>
> sorry for being so lazy as to not go look at the project pages, but
>
> This sounds like it
sorry for being so lazy as to not go look at the project pages, but
This sounds like it could be really useful, and maybe supercise a coupl eof
half-baked projects of mine. But -- what does "dynamic" mean?
- can you append to these arrays?
- can it support "ragged arrrays" -- it looks like it
I've coded a typed dynamic list based on numpy array (needed for the glumpy
project).
Code is available from https://github.com/rougier/numpy-list
A Numpy array list is a strongly typed list whose type can be anything that can
be interpreted as a numpy data type.
>>> L = ArrayList( [[0], [1,2
12 matches
Mail list logo