-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Long-termThis issue will not be considered in the near-termThis issue will not be considered in the near-termenhancementNew feature or requestNew feature or request
Description
Current situation
Currently, the dimension of the ndarray
is inferred from the shape at the run time. This would lead to extra cost.
Proposal
As the dimension is known at initialisation, it might be nice to make ndim
a parameter and known at compile time. Example:
var NDArray[2, DType.float64](1000, 1000, random=True) # Creating a 1000x1000 2-D array (matrix)
Additional benefits
Making dimension a parameter at compile time may have additional benefits. For example, we can define alias to NDArrays more easily.
alias Vector = NDArray[1, _]
alias Matrix = NDArray[2, _]
Metadata
Metadata
Assignees
Labels
Long-termThis issue will not be considered in the near-termThis issue will not be considered in the near-termenhancementNew feature or requestNew feature or request