Data types for NI Python APIs
Project description
| Info | Data types for NI Python APIs |
|---|---|
| Author | National Instruments |
Table of Contents
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.
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
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
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
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
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
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
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 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
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 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 in the
API Reference.
XYData
nitypes.xy_data.XYData is a data type that represents a two axes (sequences) of numeric values
with units information. Valid types for the numeric values are int and float. For more details,
see XYData in the
API Reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nitypes-1.1.0.dev1.tar.gz.
File metadata
- Download URL: nitypes-1.1.0.dev1.tar.gz
- Upload date:
- Size: 65.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b23e00cc6960996656c4c9ef0ca71dd267fc5c9ca481077b682c29190aa2d3
|
|
| MD5 |
9334f304129015b95e55cf924f5e0ce6
|
|
| BLAKE2b-256 |
ad194118807f49a039b224ef50e079864e2ec951534976dd9574b895d775e1bb
|
Provenance
The following attestation bundles were made for nitypes-1.1.0.dev1.tar.gz:
Publisher:
publish.yml on ni/nitypes-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitypes-1.1.0.dev1.tar.gz -
Subject digest:
50b23e00cc6960996656c4c9ef0ca71dd267fc5c9ca481077b682c29190aa2d3 - Sigstore transparency entry: 757923946
- Sigstore integration time:
-
Permalink:
ni/nitypes-python@0108c3503b34587b48649e8dc2a9862bf90fe269 -
Branch / Tag:
refs/tags/1.1.0.dev1 - Owner: https://github.com/ni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0108c3503b34587b48649e8dc2a9862bf90fe269 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nitypes-1.1.0.dev1-py3-none-any.whl.
File metadata
- Download URL: nitypes-1.1.0.dev1-py3-none-any.whl
- Upload date:
- Size: 92.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d98ad6e3f8b92db76b5c1c584431fa27d3e74cce6e20464e43ee0117b02fe089
|
|
| MD5 |
808c8073314db94ce348e729cd530486
|
|
| BLAKE2b-256 |
2a7facc2b0eae1280bc8133e41208824ffe821d75279f38cf8f4ed5b9c610888
|
Provenance
The following attestation bundles were made for nitypes-1.1.0.dev1-py3-none-any.whl:
Publisher:
publish.yml on ni/nitypes-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nitypes-1.1.0.dev1-py3-none-any.whl -
Subject digest:
d98ad6e3f8b92db76b5c1c584431fa27d3e74cce6e20464e43ee0117b02fe089 - Sigstore transparency entry: 757923948
- Sigstore integration time:
-
Permalink:
ni/nitypes-python@0108c3503b34587b48649e8dc2a9862bf90fe269 -
Branch / Tag:
refs/tags/1.1.0.dev1 - Owner: https://github.com/ni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0108c3503b34587b48649e8dc2a9862bf90fe269 -
Trigger Event:
release
-
Statement type: