Simplify / unify internal representation of numerical series
Since pint_pandas 0.5 (2023-09-07), there is support for integer and complex types, see changelog.
At several places, including serialization functions, we treat series of floats in one way (i.e. use PintArray), while series of integers or complex numbers in another way (elements have Quantity type). This was because PintArray did not support integer and complex numbers. It used to convert int into floats and issue a warning and raise an exception for complex numbers.
This code is now not necessary and processing all numerical series can be unified.
Care must be taken to ensure the serialization schema is not changed by this change.
Candidates (look around these lines):
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/instant_executor.py?ref_type=heads#L232
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/deferred_executor.py?ref_type=heads#L175
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/deferred_executor.py?ref_type=heads#L88
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/deferred_executor.py?ref_type=heads#L525
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/instant_executor.py?ref_type=heads#L232
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/instant_executor.py?ref_type=heads#L468
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/utilities/serializable.py?ref_type=heads#L135
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/utilities/types.py?ref_type=heads#L75
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/utilities/types.py?ref_type=heads#L145
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/instant_executor.py?ref_type=heads#L141
- https://gitlab.kit.edu/kit/virtmat-tools/vre-language/-/blob/master/src/virtmat/language/interpreter/instant_executor.py?ref_type=heads#L148
Edited by Ivan Kondov