Providing functions to convert axes of object arrays to and from lists

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Providing functions to convert axes of object arrays to and from lists

Przemysław Simajchel

A feature to implement functions converting last axes of object arrays to and from lists has been requested in the following issue:

I've implemented this feature, and the code can be viewed in the following pull request:

The original issue asked for functions operating on just the last axis of this array, but I decided to allow to choose a specific axis for conversion from array of objects to array of lists, because this allows for the functions to be somewhat inverses of eachother. The linked pull request provides an example showing where the inverse property wouldn't hold with only last axis conversions. 
I would like to hear your opinions about this, and if it's agreed upon,also discuss the choice of the default value of the axis parameter. At the moment it's the first axis, but I assume that this being the last axis would also make sense.

Also regarding a bit more cosmetic issues, the names of the functions and their place in the project (currently lib/ should probably be discussed, as their current names are long and clunky, yet I haven't come up with anything prettier, that would also be this expressive.

Please note that this is my first contribution to the project and so I'd also appreciate a little help regarding the failing tests on the pull request, locally everything passed so I'm not sure what's wrong.

Przemysław Simajchel

NumPy-Discussion mailing list
[hidden email]