- Notifications
You must be signed in to change notification settings - Fork20
Open
Description
Current situation
Currently, the dimension of thendarray 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 makendim a parameter and known at compile time. Example:
varNDArray[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.
aliasVector= NDArray[1, _]aliasMatrix= NDArray[2, _]