Clatrix & representation of the rows...

41 views
Skip to first unread message

Alex Ott

unread,
Dec 27, 2014, 2:12:46 PM12/27/14
to numerica...@googlegroups.com
I've got the problem with Clatrix's representation of the rows as 1xN matrices in the result of the seq/map/filter/..., so I've filled the https://github.com/tel/clatrix/issues/58 & want to discuss this once again.

What is your opinion on this? Because other implementation works without problems, only Clatrix has different approach.

P.S. I'll try to get rid of the map/filter/... in the Incanter code, but this is could be relatively big work (I'll check this tomorrow)

--
With best wishes,                    Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott

Mike Anderson

unread,
Dec 27, 2014, 9:29:47 PM12/27/14
to numerica...@googlegroups.com
I think it would be better if Clatrix switched to returning 1D vectors as the result of map / filter / seq etc. This makes more logical sense and would align better with core.matrix (although core.matrix doesn't place any restrictions on whether array objects are seqable or not...)

That would be a pretty big breaking change of course! So it may be more appropriate to leave this as it is at least until Clatrix gets a major revamp.

More generally though, I'd encourage the use of the equivalent core.matrix API function for getting slices and elements etc. (slice, slices etc.). This has the *big* advantage that these functions are backed with protocols, so they can be extended to arbitrary array types which you can't do with built-in seq, filer, map etc.). I think Incanter should be able to use these and eliminate map / filter etc. entirely.

Mike Anderson

unread,
Dec 27, 2014, 9:39:45 PM12/27/14
to numerica...@googlegroups.com
P.S. happy to help with a bit of Incanter refactoring if needed

Alex Ott

unread,
Dec 28, 2014, 5:27:15 AM12/28/14
to numerica...@googlegroups.com
Thanks

I think that this will be 2-step action - I first try to quickly fix the existing problem with clatrix, and after that - try to estimate the amount of changes in Incanter, so we can plan this work...

--
You received this message because you are subscribed to the Google Groups "Numerical Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numerical-cloj...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages