[pythran] ndarray

  • From: Neal Becker <ndbecker2@xxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Fri, 29 Aug 2014 08:38:11 -0400

I noticed pythran using ndarray c++ class, and wondered if it was similar to


which I have been making heavy use of for my python c++ needs.

It seems not.

https://github.com/ndarray/ndarray uses 3 template parameters


where T is type
N is #dim
M is #contiguous dimensions

which allows optimization based on contiguity.  Would pythran be able to
optimize based on contiguousness?  For example:

#export sum(int[])
def sum (x):

would pythran be able to detect whether the argument is contiguous and
dispatch accordingly?

*Those who don't understand recursion are doomed to repeat it*

Other related posts: