Skip to content

Commit a5f499d

Browse files
authored
Create an XYData class (#204)
* Create an XYData class Signed-off-by: Michael Johansen <[email protected]> * Add more unit tests for corner cases. Signed-off-by: Michael Johansen <[email protected]> * Update intro.inc and the RTD link in README. Signed-off-by: Michael Johansen <[email protected]> * Refactors and fixes based on review feedback. Signed-off-by: Michael Johansen <[email protected]> * Re-implement using NumPy. Remove append functionality. Signed-off-by: Michael Johansen <[email protected]> * Remove/make constants private. Signed-off-by: Michael Johansen <[email protected]> * Add a few more unit tests. Signed-off-by: Michael Johansen <[email protected]> * Fix doctests. Signed-off-by: Michael Johansen <[email protected]> * Fix repr tests on oldest python/numpy. Signed-off-by: Michael Johansen <[email protected]> * Fix linting issue. Signed-off-by: Michael Johansen <[email protected]> * Include non-units properties in __repr__(). Signed-off-by: Michael Johansen <[email protected]> * Fix linting issues. Signed-off-by: Michael Johansen <[email protected]> * Update stale docs. Remove old spectrum references. Signed-off-by: Michael Johansen <[email protected]> * Make TypeVars public Signed-off-by: Michael Johansen <[email protected]> * Rename x_values to x_data and y_values to y_data. Signed-off-by: Michael Johansen <[email protected]> * Remove x_units and y_units from reduce() Signed-off-by: Michael Johansen <[email protected]> --------- Signed-off-by: Michael Johansen <[email protected]>
1 parent 0dd1d21 commit a5f499d

File tree

5 files changed

+873
-0
lines changed

5 files changed

+873
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
- [Binary Time](#binary-time)
2424
- [Scalar Values](#scalar-values)
2525
- [Scalar](#scalar)
26+
- [Vector](#vector)
27+
- [XYData](#xydata)
2628

2729
# About
2830

@@ -141,4 +143,11 @@ API Reference.
141143
information and extended properties. Valid types for the scalar values are `bool`, `int`, `float`,
142144
and `str`. For more details, see
143145
[Scalar](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/vector/index.html#vector) in the
146+
API Reference.
147+
148+
## XYData
149+
150+
`nitypes.xy_data.XYData` is a data type that represents a two axes (sequences) of numeric values
151+
with units information. Valid types for the numeric values are `int` and `float`. For more details,
152+
see [XYData](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/xy_data/index.html) in the
144153
API Reference.

docs/intro.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,9 @@ Vector
114114
:class:`Vector` is a data type that represents an array of scalar values with units
115115
information. Valid types for the scalar values are :any:`bool`, :any:`int`,
116116
:any:`float`, and :any:`str`.
117+
118+
XYData
119+
^^^^^^
120+
121+
:class:`XYData` is a data type that represents a two axes (sequences) of numeric values with
122+
units information. Valid types for the numeric values are :any:`int` and :any:`float`.

0 commit comments

Comments
 (0)