Cdflib

Latest version: v1.3.3

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.3.3

=====
Worked through a backlog of bugs

xarray_to_cdf
-------------
- Fixed errors that come up with ISTP compliance when a support_data variable has no time variance and depends on another support_data variable
- Fully remove the deprecated flags of from_unixtime, from_datetime, unixtime_to_cdftt2000, datetime_to_cdftt2000, datetime64_to_cdftt2000
- Added a check to verify that LABLAXIS/LABL_PTR variables have the same dimensions as the data they need to label

cdfwrite
--------
- Now throw an error when np.uint64 data is given, as it is not a supported data type
- Fixed a bug that wrote a record's length incorrectly for certain string inputs, causing corrupt CDF files to be generated

cdfread
--------
- Fixed a bug where string data was given an extra dimension once read

cdf_to_xarray
--------------
- Fixed a bug that caused all data to be squeezed, removing dimensions of size 1

epochs
------
- Fixed a bug that occured in CDF_TT2000 to np.datetime64 conversion code, which caused all "minutes" to be dropped from the dates if the array contained any dates from before 1972 (which includes all FILLVALs)

1.3.2

=====
cdfread
-------
- Updated cdfread to allow anon access from AWS S3

1.3.1

=====
General Updates
---------------
- Added tox to serve as the unit testing infrastructure, and changed which unit tests were run (see the github actions to see what exactly is running)
- Added tests to check future versions of numpy and astropy
- Added back in the remote data unit tests

xarray_to_cdf
-------------
- Added an ISTP check to determine is attribute and variable names are compliant

cdfwrite
---------
- Clearer error message surrounding data type conversions to CDF data types

1.3.0

=====
General Updates
---------------
- Added .devcontainer to support development of cdflib on github
- Renamed the master branch to "main"
- Added netcdf4 to the test dependencies
- unit tests no longer test to_unixtime and from_unixtime conversions. The loss in the decimal place that occurs from floating point arithmetic causes too many issues. It may be deprecated functionality in the future.

xarray_to_cdf
-------------
- In general, numpy types now have a 1-to-1 correspondence with CDF data types in xarray_to_cdf and cdf_to_xarray. See the documentation for more details
- Added an ISTP check in xarray_to_cdf to verify that epochs are monotonically increasing
- Added an ISTP check in xarray_to_cdf to determine if we need a LABL_PTR_1 or LABLAXIS
- Added ability to manually set the CDF data type of a variable in xarray_to_cdf
- Added checks in xarray_to_cdf to ensure all CDF_EPOCH16 variables can be cast to a complex128 data type
- Added automatic conversion of python datetime objects to CDF time variables in xarray_to_cdf, deprecating the from_datetime and datetime_to_cdftt2000 flags
- Added automatic conversion of numpy datetime64 arrays to CDF time variables in xarray_to_cdf, deprecating the datetime64_to_cdftt2000
- Automatically populates the FILLVAL attribute with the appropriate ISTP compliant fillvals
- Ignores variables attributes named "TIME_ATTRS" and "CDF_DATA_TYPE" from being written to the CDF. While these are used to modify the function's behavior, they will no longer show up in the CDF file.
- NaNs and NaTs will automatically be converted to the appropriate FILLVAL. To keep NaNs in the cdf file, use "nan_to_fillval=False"

cdf_to_xarray
-------------
- To help avoid some "lossy" conversion from CDF files, cdf_to_xarray will append 2 attributes to the variables in the object created. CDF_DATA_TYPE will hold the type of CDF data the variable was if it was not obvious. TIME_ATTRS contains a list of attributes that represeted time. These attributes enable better conversion of the xarray object back to a CDF file. These attributes are also automatically ignored when writing to the CDF file.
- fillval_to_nan will now automatically convert CDF time variables to datetime64('NaT')

epochs
------
- to_datetime will now give nano-second precision
- to_datetime will return all FILLVAL, PAD VALUES, and NaNs to datetime64('NaT')
- compute(_epoch/_epoch16/_tt2000) returns 0000-01-01T00:00:00.000 for PAD VALUES, keeping with CDF standards

1.2.6

=====
- Fixed a bug in cdf_to_xarray that couldn't find dimensions for a variable if there was only one record

1.2.5

=====
- Fixed bugs in the xarray conversion code that occured when handling numpy arrays with a length but a dimension of 0.

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.