You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applying svd to a persistent-vector or ndarray matrix throws an exception if the current implementation doesn't support svd (i.e. if it's persistent-vector or ndarray), but if the current implementation does support svd (vectorz or clatrix), then svd applied to a persistent-vector or ndarray matrix will return the value of the current implementation's svd. (I don't think that this is an intended behavior; it seems confusing and error-prone to me.) I don't know whether there are other functions that have similar behavior.
I see. I don't know. I see what you're saying, but on the other hand it seems odd that whether it falls back or throws an exception depends on what the current implementation is set to. I was experimenting and had current implementation set to vectorz, and then restarted without changing the current implementation (i.e. it was persistent-vector), and all of a sudden there were exceptions thrown. That was surprising. I don't have a strong opinion about it, but I think I would prefer to get the exception no matter what, and then I can respond by explicitly convert to an implementation that has svd if I want. But this is not a big deal for me. I had never used svd until I started writing a Moore-Penrose inverse. (Working on that and learning what I needed to know in spare moments.)
For a moment I was thinking that if the current implementation doesn't support svd, it should fall back to ndarray, or maybe vectorz first if that's available, but I think that would probably cause problems with aljabr in Clojurescript. I assume that ndarray is still Clojure-only.
btw I just noticed that svd returns nil on an aljabr matrix. Is that what one should expect?
Applying
svd
to a persistent-vector or ndarray matrix throws an exception if the current implementation doesn't supportsvd
(i.e. if it's persistent-vector or ndarray), but if the current implementation does supportsvd
(vectorz or clatrix), then svd applied to a persistent-vector or ndarray matrix will return the value of the current implementation'ssvd
. (I don't think that this is an intended behavior; it seems confusing and error-prone to me.) I don't know whether there are other functions that have similar behavior.For example:
The text was updated successfully, but these errors were encountered: