Closed nstarman closed 3 days ago
@adrn @jnibauer the more I think about it the more I like from_
. It's the closest we have to existing constructor patterns and it also makes it clear that we aren't making or creating the arguments, but making a new Quantity from the arguments.
This is updated
While it's very explicit and closely follows the terminology in the Python data model it's just so verbose.
Replacement options:
make
: pros: explicit that it's making something. cons: maybe vague what it's making. Could be a MakeFile?new
: pros: it evokes__new__
, to which it is similar. cons: same as make.create
: 🤷 mehfrom_
: pros: 1) it closely follows the classmethod constructor pattern 2) it's kinda similar todict.fromkeys
, and 3) it fits naturally into any bespoke constructors we add in the future, e.gfrom_file
(which might calljnp.load
). cons: ?@adrn @jnibauer what are your thoughts on the above options / do you have any others?
Once we decide for
unxt
I'll propagate this up tocoordinax
andgalax
.