joelberkeley / spidr

Accelerated machine learning with dependent types
Apache License 2.0
72 stars 4 forks source link

Drop `Tensor` name #410

Open joelberkeley opened 1 month ago

joelberkeley commented 1 month ago

I reckon the Tensor name is redundant, and we can just define a "tensor" as e.g. F64 [2, 5] or U64 []. This would be a fairly big overhaul of the dtype API, but I suspect can be done without changing the implementation. We could even do sth like

F64 : Shape -> Type
F64 shape = Tensor shape F64'

It might get messy for functions polymorphic in the dtype, like (+)