Re: An Attempt to Access NumPy Array Data rom Nim

2019-02-02 Thread zarican
Hi @mratsim, First, you have done great job with arraymancer. Kudos! Thanks a lot for the detailed explanation about ptr arithmetic to access buffer elements. Particularly, casting to UncheckedArray is very useful in my case. Other ways have many use cases too. I am going to update my Numpy ar

Re: An Attempt to Access NumPy Array Data rom Nim

2019-02-01 Thread mratsim
Hey there, authore of Arraymancer here. Accessing elements using ptr arithmetic: * Usually you when you need pointer arithmetics you actually need pointer indexing similar to: let rawBuffer = [0, 1, 2, 3, 4, 5] # use unsafeAddr if let variable # or a

Re: An Attempt to Access NumPy Array Data rom Nim

2019-01-30 Thread zarican
Thanks. Indeed, neo, arraymancer and nimtorch are feasible alternatives. Regarding accessing elements using ptr arithmetic, is there a simpler way? Is there a generic way for pointer casting (instead of ptr cdouble)?

Re: An Attempt to Access NumPy Array Data rom Nim

2019-01-29 Thread mitai
there is also: [https://github.com/mratsim/Arraymancer](https://github.com/mratsim/Arraymancer)

Re: An Attempt to Access NumPy Array Data rom Nim

2019-01-29 Thread miran
> Numpy in Python has an important place for computing tasks and until we have > an equivalent (or better) package in nim, we may need to delegate some work > to NumPy (or vice versa). I'm not saying it is an equivalent to numpy, but I had a good experience with using [Neo](https://github.com/u

Re: An Attempt to Access NumPy Array Data rom Nim

2019-01-29 Thread zarican
With --d:release flag, nim c --opt:speed --d:release --app:lib --out:nimpy_numpy.so nimpy_numpy Run It is now faster than NumPy. processing time: numpy: 0.6880900859832764 nim: 0.5004160404205322

An Attempt to Access NumPy Array Data rom Nim

2019-01-29 Thread zarican
Hi, I am new to nim but I plan to invest time to learn and use it for my scientific computing work. Numpy in Python has an important place for computing tasks and until we have an equivalent (or better) package in nim, we may need to delegate some work to NumPy (or vice versa). Thus, I tried to