themetaschemer / malt

Machine Learning Toolkit accompanying The Little Learner by Daniel P. Friedman and Anurag Mendhekar
MIT License
212 stars 25 forks source link

Empty tensor #38

Closed davidgrenier closed 1 year ago

davidgrenier commented 1 year ago

Hello,

I'm unclear whether empty tensor shouldn't be a thing, but I had been having trouble because (vector) and (build-vector 0) would never return.

I've since figured (tlen (vector)) properly returned 0 and the issue might be with pretty printing empty tensor.

themetaschemer commented 1 year ago

Yes, if you have the latest malt, you won't be able to build an empty tensor. You can, of course, fake it with an empty vector in some representations, but yes, there is a known pretty printing bug on the "empty" tensor.