| **Info** | Data types for NI Python APIs |
| :------------ | :-----------------------------|
| **Author** | National Instruments |
# Table of Contents
- [Table of Contents](#table-of-contents)
- [About](#about)
- [Documentation](#documentation)
- [Operating System Support](#operating-system-support)
- [Python Version Support](#python-version-support)
- [Installation](#installation)
- [Waveforms](#waveforms)
- [Analog Waveforms](#analog-waveforms)
- [Complex Waveforms](#complex-waveforms)
- [Digital Waveforms](#digital-waveforms)
- [Frequency Spectrums](#frequency-spectrums)
- [Complex Numbers](#complex-numbers)
- [Complex Integers](#complex-integers)
- [Complex Number Conversion](#complex-number-conversion)
- [Time](#time)
- [Time Conversion](#time-conversion)
- [Binary Time](#binary-time)
- [Scalar Values](#scalar-values)
- [Scalar](#scalar)
# About
The `nitypes` Python package defines data types for NI Python APIs:
- Analog, complex, and digital waveforms
- Frequency spectrums
- Complex integers
- Time conversion
NI created and supports this package.
## Documentation
See the [API Reference](https://nitypes.readthedocs.io/).
## Operating System Support
`nitypes` supports Windows and Linux operating systems.
## Python Version Support
`nitypes` supports CPython 3.9+ and PyPy3.
# Installation
Installing NI driver Python APIs that support waveforms will automatically install `nitypes`.
You can also directly install the `nitypes` package using `pip` or by listing it as a dependency in
your project's `pyproject.toml` file.
# Waveforms
## Analog Waveforms
The `nitypes.waveform.AnalogWaveform` class represents a single analog signal with timing
information and extended properties (such as channel name and units). Multi-channel analog data is
represented using a collection of waveforms, such as `list[nitypes.waveform.AnalogWaveform]`. For
more details, see [Analog
Waveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#analog-waveforms)
in the API Reference.
## Complex Waveforms
The `nitypes.waveform.ComplexWaveform` class represents a complex-number signal, such as I/Q data,
with timing information and extended properties (such as channel name and units). For more details,
see [Complex
Waveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#complex-waveforms)
in the API Reference.
## Digital Waveforms
The `nitypes.waveform.DigitalWaveform` class represents one or more digital signals with timing
information and extended properties (such as channel name and signal names). For more details, see
[Digital
Waveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#complex-waveforms)
in the API Reference.
## Frequency Spectrums
The `nitypes.waveform.Spectrum` class represents a frequency spectrum with frequency range
information and extended properties (such as channel name and units). For more details, see
[Frequency
Spectrums](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#frequency-spectrums)
in the API Reference.
# Complex Numbers
## Complex Integers
`nitypes.complex.ComplexInt32DType` is a NumPy structured data type object representing a complex
integer with 16-bit `real` and `imag` fields. This structured data type has the same memory layout
as the NIComplexI16 C struct used by NI driver APIs. For more details, see [Complex
Integers](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/complex/index.html#complex-integers)
in the API Reference.
## Complex Number Conversion
You can use the `nitypes.complex.convert_complex()` function to convert complex-number NumPy arrays
between `nitypes.complex.ComplexInt32DType` and the standard `np.complex64` and `np.complex128` data
types. For more details, see [Complex >>
Conversion](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/complex/index.html#conversion)
in the API Reference.
# Time
## Time Conversion
You can use the `nitypes.time.convert_datetime()` and `nitypes.time.convert_timedelta()` functions
to convert time values between the standard `datetime` library, the high-precision `hightime`
library, and `bintime`. For more details, see [Time >>
Conversion](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/time/index.html#conversion) in
the API Reference.
## Binary Time
The `nitypes.bintime` module implements the NI Binary Time Format (NI-BTF), a high-resolution time
format used by NI software. An NI-BTF time value is a 128-bit fixed point number consisting of a
64-bit whole seconds part and a 64-bit fractional seconds part. For more details, see [NI Binary
Time Format](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/bintime/index.html#ni-binary-time-format)
in the API Reference.
# Scalar Values
## Scalar
`nitypes.scalar.Scalar` is a data type that represents a single scalar value with units
information and extended properties. Valid types for the scalar value are `bool`, `int`, `float`,
and `str`. For more details, see
[Scalar](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/scalar/index.html#scalar) in the
API Reference.
## Vector
`nitypes.vector.Vector` is a data type that represents an array of scalar values with units
information and extended properties. Valid types for the scalar values are `bool`, `int`, `float`,
and `str`. For more details, see
[Scalar](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/vector/index.html#vector) in the
API Reference.
Raw data
{
"_id": null,
"home_page": "https://github.com/ni/nitypes-python",
"name": "nitypes",
"maintainer": "Brad Keryan",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "brad.keryan@ni.com",
"keywords": "nitypes",
"author": "NI",
"author_email": "opensource@ni.com",
"download_url": "https://files.pythonhosted.org/packages/a5/80/5d58b34fe1097dffce03e760cadb6ad58f35a663c479995f127f9c3ea18e/nitypes-0.1.0.dev7.tar.gz",
"platform": null,
"description": "| **Info** | Data types for NI Python APIs |\n| :------------ | :-----------------------------|\n| **Author** | National Instruments |\n\n# Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [About](#about)\n - [Documentation](#documentation)\n - [Operating System Support](#operating-system-support)\n - [Python Version Support](#python-version-support)\n- [Installation](#installation)\n- [Waveforms](#waveforms)\n - [Analog Waveforms](#analog-waveforms)\n - [Complex Waveforms](#complex-waveforms)\n - [Digital Waveforms](#digital-waveforms)\n - [Frequency Spectrums](#frequency-spectrums)\n- [Complex Numbers](#complex-numbers)\n - [Complex Integers](#complex-integers)\n - [Complex Number Conversion](#complex-number-conversion)\n- [Time](#time)\n - [Time Conversion](#time-conversion)\n - [Binary Time](#binary-time)\n- [Scalar Values](#scalar-values)\n - [Scalar](#scalar)\n\n# About\n\nThe `nitypes` Python package defines data types for NI Python APIs:\n\n- Analog, complex, and digital waveforms\n- Frequency spectrums\n- Complex integers\n- Time conversion\n\nNI created and supports this package.\n\n## Documentation\n\nSee the [API Reference](https://nitypes.readthedocs.io/).\n\n## Operating System Support\n\n`nitypes` supports Windows and Linux operating systems.\n\n## Python Version Support\n\n`nitypes` supports CPython 3.9+ and PyPy3.\n\n# Installation\n\nInstalling NI driver Python APIs that support waveforms will automatically install `nitypes`.\n\nYou can also directly install the `nitypes` package using `pip` or by listing it as a dependency in\nyour project's `pyproject.toml` file.\n\n# Waveforms\n\n## Analog Waveforms\n\nThe `nitypes.waveform.AnalogWaveform` class represents a single analog signal with timing\ninformation and extended properties (such as channel name and units). Multi-channel analog data is\nrepresented using a collection of waveforms, such as `list[nitypes.waveform.AnalogWaveform]`. For\nmore details, see [Analog\nWaveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#analog-waveforms)\nin the API Reference.\n\n## Complex Waveforms\n\nThe `nitypes.waveform.ComplexWaveform` class represents a complex-number signal, such as I/Q data,\nwith timing information and extended properties (such as channel name and units). For more details,\nsee [Complex\nWaveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#complex-waveforms)\nin the API Reference.\n\n## Digital Waveforms\n\nThe `nitypes.waveform.DigitalWaveform` class represents one or more digital signals with timing\ninformation and extended properties (such as channel name and signal names). For more details, see\n[Digital\nWaveforms](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#complex-waveforms)\nin the API Reference.\n\n## Frequency Spectrums\n\nThe `nitypes.waveform.Spectrum` class represents a frequency spectrum with frequency range\ninformation and extended properties (such as channel name and units). For more details, see\n[Frequency\nSpectrums](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/waveform/index.html#frequency-spectrums)\nin the API Reference.\n\n# Complex Numbers\n\n## Complex Integers\n\n`nitypes.complex.ComplexInt32DType` is a NumPy structured data type object representing a complex\ninteger with 16-bit `real` and `imag` fields. This structured data type has the same memory layout\nas the NIComplexI16 C struct used by NI driver APIs. For more details, see [Complex\nIntegers](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/complex/index.html#complex-integers)\nin the API Reference.\n\n## Complex Number Conversion\n\nYou can use the `nitypes.complex.convert_complex()` function to convert complex-number NumPy arrays\nbetween `nitypes.complex.ComplexInt32DType` and the standard `np.complex64` and `np.complex128` data\ntypes. For more details, see [Complex >>\nConversion](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/complex/index.html#conversion)\nin the API Reference.\n\n# Time\n\n## Time Conversion\n\nYou can use the `nitypes.time.convert_datetime()` and `nitypes.time.convert_timedelta()` functions\nto convert time values between the standard `datetime` library, the high-precision `hightime`\nlibrary, and `bintime`. For more details, see [Time >>\nConversion](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/time/index.html#conversion) in\nthe API Reference.\n\n## Binary Time\n\nThe `nitypes.bintime` module implements the NI Binary Time Format (NI-BTF), a high-resolution time\nformat used by NI software. An NI-BTF time value is a 128-bit fixed point number consisting of a\n64-bit whole seconds part and a 64-bit fractional seconds part. For more details, see [NI Binary\nTime Format](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/bintime/index.html#ni-binary-time-format)\nin the API Reference.\n\n# Scalar Values\n\n## Scalar\n\n`nitypes.scalar.Scalar` is a data type that represents a single scalar value with units\ninformation and extended properties. Valid types for the scalar value are `bool`, `int`, `float`,\nand `str`. For more details, see\n[Scalar](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/scalar/index.html#scalar) in the\nAPI Reference.\n\n## Vector\n\n`nitypes.vector.Vector` is a data type that represents an array of scalar values with units\ninformation and extended properties. Valid types for the scalar values are `bool`, `int`, `float`,\nand `str`. For more details, see\n[Scalar](https://nitypes.readthedocs.io/en/latest/autoapi/nitypes/vector/index.html#vector) in the\nAPI Reference.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Data types for NI Python APIs",
"version": "0.1.0.dev7",
"project_urls": {
"Documentation": "https://nitypes.readthedocs.io/",
"Homepage": "https://github.com/ni/nitypes-python",
"Repository": "https://github.com/ni/nitypes-python"
},
"split_keywords": [
"nitypes"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "027731075109b69f629fbcf3a70535b0f376920fdca9e60552dc62916c874d3a",
"md5": "5edfbd9db10f83e7504a2437c70b1ef5",
"sha256": "a1452da4bfaf57bbc4d34ab7859add661cc42d8a88f14aeaa4d56d51af0ef3b1"
},
"downloads": -1,
"filename": "nitypes-0.1.0.dev7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5edfbd9db10f83e7504a2437c70b1ef5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 84117,
"upload_time": "2025-08-08T19:19:44",
"upload_time_iso_8601": "2025-08-08T19:19:44.730906Z",
"url": "https://files.pythonhosted.org/packages/02/77/31075109b69f629fbcf3a70535b0f376920fdca9e60552dc62916c874d3a/nitypes-0.1.0.dev7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a5805d58b34fe1097dffce03e760cadb6ad58f35a663c479995f127f9c3ea18e",
"md5": "3b065aa11fb2b5bee389afd22512c1c3",
"sha256": "b34aa4b6c8b54c0c1aaf38e0bdaee8dcc259f15560b56b1f4c947566c0456424"
},
"downloads": -1,
"filename": "nitypes-0.1.0.dev7.tar.gz",
"has_sig": false,
"md5_digest": "3b065aa11fb2b5bee389afd22512c1c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 61158,
"upload_time": "2025-08-08T19:19:46",
"upload_time_iso_8601": "2025-08-08T19:19:46.229915Z",
"url": "https://files.pythonhosted.org/packages/a5/80/5d58b34fe1097dffce03e760cadb6ad58f35a663c479995f127f9c3ea18e/nitypes-0.1.0.dev7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 19:19:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ni",
"github_project": "nitypes-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nitypes"
}