Cleanup PrimDef #479

Merged
sb10q merged 4 commits from clean-primdef into master 2024-07-27 21:57:47 +08:00
1 changed files with 8 additions and 4 deletions
Showing only changes of commit 2ec9966898 - Show all commits

View File

@ -42,7 +42,7 @@ pub enum PrimDef {
// Range methods // Range methods
FunRangeInit, FunRangeInit,
// NumPy & SciPy functions // NumPy factory functions
FunNpNDArray, FunNpNDArray,
FunNpEmpty, FunNpEmpty,
FunNpZeros, FunNpZeros,
@ -51,6 +51,8 @@ pub enum PrimDef {
FunNpArray, FunNpArray,
FunNpEye, FunNpEye,
FunNpIdentity, FunNpIdentity,
// Miscellaneous NumPy & SciPy functions
FunNpRound, FunNpRound,
FunNpFloor, FunNpFloor,
FunNpCeil, FunNpCeil,
@ -98,7 +100,7 @@ pub enum PrimDef {
FunNpHypot, FunNpHypot,
FunNpNextAfter, FunNpNextAfter,
// Miscellaneous // Miscellaneous Python & NAC3 functions
FunInt32, FunInt32,
FunInt64, FunInt64,
FunUInt32, FunUInt32,
@ -211,7 +213,7 @@ impl PrimDef {
// Range methods // Range methods
PrimDef::FunRangeInit => fun("range.__init__", Some("__init__")), PrimDef::FunRangeInit => fun("range.__init__", Some("__init__")),
// NumPy & SciPy functions // NumPy factory functions
PrimDef::FunNpNDArray => fun("np_ndarray", None), PrimDef::FunNpNDArray => fun("np_ndarray", None),
PrimDef::FunNpEmpty => fun("np_empty", None), PrimDef::FunNpEmpty => fun("np_empty", None),
PrimDef::FunNpZeros => fun("np_zeros", None), PrimDef::FunNpZeros => fun("np_zeros", None),
@ -220,6 +222,8 @@ impl PrimDef {
PrimDef::FunNpArray => fun("np_array", None), PrimDef::FunNpArray => fun("np_array", None),
PrimDef::FunNpEye => fun("np_eye", None), PrimDef::FunNpEye => fun("np_eye", None),
PrimDef::FunNpIdentity => fun("np_identity", None), PrimDef::FunNpIdentity => fun("np_identity", None),
// Miscellaneous NumPy & SciPy functions
PrimDef::FunNpRound => fun("np_round", None), PrimDef::FunNpRound => fun("np_round", None),
PrimDef::FunNpFloor => fun("np_floor", None), PrimDef::FunNpFloor => fun("np_floor", None),
PrimDef::FunNpCeil => fun("np_ceil", None), PrimDef::FunNpCeil => fun("np_ceil", None),
@ -267,7 +271,7 @@ impl PrimDef {
PrimDef::FunNpHypot => fun("np_hypot", None), PrimDef::FunNpHypot => fun("np_hypot", None),
PrimDef::FunNpNextAfter => fun("np_nextafter", None), PrimDef::FunNpNextAfter => fun("np_nextafter", None),
// Miscellaneous // Miscellaneous Python & NAC3 functions
PrimDef::FunInt32 => fun("int32", None), PrimDef::FunInt32 => fun("int32", None),
PrimDef::FunInt64 => fun("int64", None), PrimDef::FunInt64 => fun("int64", None),
PrimDef::FunUInt32 => fun("uint32", None), PrimDef::FunUInt32 => fun("uint32", None),