-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Npy file support #17
Npy file support #17
Conversation
structure Dtype where | ||
name : TensorLib.Dtype.Name | ||
order : ByteOrder | ||
deriving BEq, Repr, Inhabited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this defined already in Dtype.lean
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but this one supports "native" which I want to avoid but need to support parsing. There is some duplicate constructors but it's not too awful I think. I thought about trying to use Lean to get the byte ordering of the processor but decided against it. We can revisit later?
descr : Dtype | ||
dataOrder : DataOrder := DataOrder.C | ||
shape : Shape | ||
deriving Repr, Inhabited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side comment, I have a "tensor type" in NKL, which is basically this structure. However, I need BEq.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use Header
for that. This is supposed to be an annoying implementation detail. You don't need the version number for example.
85c35c4
to
629ebe3
Compare
NumPy uses a custom binary format to store ndarrays. This file implements that format.
NumPy uses a custom binary format to store ndarrays. This file implements that format.