-
Notifications
You must be signed in to change notification settings - Fork 51
Support for n-dimensional matrices #400
Comments
We have had various private discussions about the addition of a tensor package; it is something that I would like to see for some work I want to do, though its priority is low. Having said that, the design discussion that will be needed before we could start this is not trivial; efficient tensor calculation is complicated - the underlying representation of tensors maximising efficiency is highly dependent on the work that is being done, and the API for an n-dimensional layout is more complicated than that for 2-D (it may be more obvious after an n-dimensional slice proposal/change has been added to the language). If you would like to start discussion on this (particularly if you have domain knowledge that would bring experience to the discussion), please start a thread at gonum-dev. |
Very interesting — glad to hear there was a lot of thought behind this decision, and I'm looking forward to seeing (and hopefully being part of) where the package heads next. I'm closing this issue for now, and I'll do some more research on implementation before heading over to gonum-dev. Thanks! |
One issue to consider is supporting an particular sized structure for n >2, or a single structure that can support for any n. They are both useful, but it's generally more efficient to have a specially designed structure if the dimension is known ahead of time. gonum/matrix is that for the n = 2 case. |
There is worthwhile discussion in this document (C++ template library implementation of tensors) and the associated PDF dealing with efficiency. The problem of API design is possibly more complicated, particularly since it needs to fit in with the general design principles that already exist in |
I may have closed this prematurely — would love to be part of this discussion if we're planning on re-opening..? |
Hi all — want to start this off by saying that this is a very impressive codebase...and caveating the following with the fact that I'm both new(ish) to Go and very new to
gonum/matrix
, so I apologize if this has been addressed previously.I'm curious if there was a conscious design-decision to only support 2D matrices, and if there has been any work toward n-dimensional matrices. It looks like this package was quite intentionally designed around a 2D structure, and I'm curious if this is because few gophers are working in higher-dimensional data, or if there is a clever workaround I'm not understanding.
The text was updated successfully, but these errors were encountered: