emmo-repo / EMMO

Elementary Multiperspective Material Ontology (EMMO)
Other
67 stars 18 forks source link

270 complex numbers #289

Open jesper-friis opened 8 months ago

jesper-friis commented 8 months ago

Closes #270

(Continuation of PR #284 targeting 1.0.0-rc1)

Added custom datatypes following the Python representation: 4+5j. It would be preferable if we could find existing adopted datatypes.

The choice of "j" to denote imaginary numbers can be discussed. Chosen here to be aligned with Python. However, if we want to generalise to quatarnions, probably "i" would be a better choice, allowing them to be represented with ("i", "j", "k"), avoiding "l" which is difficult to distinguish from 1.

Open for comments. An alternative representation would be as a JSON array with two elements: [4, 5]. There exists probably already a well-known datatype for JSON data.