SciRuby / numruby

Fast Numerical Linear Algebra Library for Ruby. NMatrix reimplementation.
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Implemented pretty_print, to_a for dimension = 2 #13

Closed Uditgulati closed 5 years ago

Uditgulati commented 5 years ago

Issue -> https://github.com/prasunanand/nmatrix_reloaded/issues/6

Uditgulati commented 5 years ago

@prasunanand The C API returns only a flat list of elements, so in order to traverse each row or column, I used incrementing of index. Let me know if there is some better way.

Also, are there any other functions that needs to be implemented with them?

prasunanand commented 5 years ago

You need to implement indexers for n dimension.

Uditgulati commented 5 years ago

@prasunanand Can you provide an example on how indexers for n dimension should look like or maybe some reference material for it?

prasunanand commented 5 years ago

This would be a GSoC task.

Uditgulati commented 5 years ago

Ok, thanks. Anything else required for this PR?

Uditgulati commented 5 years ago

Updated to https://github.com/SciRuby/numruby/pull/36