Releases: perrette/dimarray
Python 3 support + simplification course
Cleaner fix for cartopy Stereographic projection
In previous releases, a fix to cartopy classes was done by modifying cartopy.crs module.
In this release, the fix only applies to dimarray.compat.cartopy_crs, as it should.
faster 2D interpolation
Use scipy.interpolate.RegularGridInterpolator instead of basemap interp.
This also involves new parameters for dimarray.geo.transform
, dimarray.geo.transform_vectors
and dimarray.interp2d
, accordingly to the new underlying function.
In particular this may require the use of keyword argument bounds_error = False
for new axes that are out-of-bound with respect to original axes.
0.2.3
0.2
- deprecated / removed:
aggregate
(not useful)DimArray.groupby
(not really a multi-dimensional operation, alternative: dima.to_pandas().groupby(...) )
- modified behavior
- multi-dimension indexing : now "orthogonal" by default. Use
DimArray.take(..., broadcast=True)
to broadcast arrays on the same axis, consistently with numpy.
- multi-dimension indexing : now "orthogonal" by default. Use
- renamed:
DimArray.group
=>DimArray.flatten
DimArray.ungroup
=>DimArray.unflatten
GroupedAxis
=>MultiAxis
align_axes
=>align
- new features:
align
: newjoin=
parameter "inner" or "outer"- slicing on ordered numerical axis : a[2.:4.] on [1.5, 2.5, 3.5, 4.5] now works and return values on [2.5, 3.5]
open_nc
to return aDatasetOnDisk
: allow examination of datasets without actually reading it (somewhere between read_nc and the original netCDF4 module)DimArray.iloc
,DimArray.loc
,DimArray.sel
,DimArray.isel
: convergence toward xray/pandas APIDimArray.nloc
: like DimArray.loc but nearest-neighbor indexing- numpy.datetime64 can now be written to netCDF, and converted back (conversion adapted from on
xray.conventions
functions)
- internal:
- indexing rewritten from the bottom up (basically: numpy.argsort + searchsorted and subsequent check, when more than one element is searched,
nonzero
otherwise)
==> much shorter source code
==> more efficient calculations (reindexing-speed comparable with xray, a factor 2 slower than pandas)
==> no dependency on pandas anymore - netCDF I/O rewritten, too, now relies on DatasetOnDisk, DimArrayOnDisk, AxisOnDisk, AxesOnDisk, AttrsOnDisk classes.
- AbstractDimArray, AbstractDataset and AbstractAxis classes from which DimArray and DimArrayOnDisk derive
==> indexing and formatting unified
- indexing rewritten from the bottom up (basically: numpy.argsort + searchsorted and subsequent check, when more than one element is searched,
- experimental:
- dimarray.geo.crs.get_crs() : returns an instance of a cartopy CRS class based on a dictionary of CF conventions
- dimarray.geo.transform() : transform and interpolate a dimarray from one coordinate system to another
- dimarray.geo.transform_array() : transform and interpolate two dimarrays
Temporary roadmap for future release(s)
Mostly, simplify and thin down the source code, make it more readable:
- dataset : do not make it an instance of OrderedDict with management of axes copy/refs as it is now, but make it a new object.
- simplify indexing in abstract classes (keep only orthogonal indexing, provide array index broadcasting as a separate function)
- simplify axes definition (allow only a few possible methods, to reduce the amount of checks)
- deprecate the dimarray.geo.GeoArray object, and flatten the sub-package for the user
(everything accessible from dimarray.geo (not crs etc...)) - review the library of functions provided, only keep the most useful ones
- simplify the cascade of classes in the netCDF I/O part
- remove the global option file?
- improve unit tests to have less redundancy, more readability
last release before 0.2
This release is not a true release, but an intermediate milestone which contains a number of bug fixes and improvements, as well as a beta version of the geo module. It will be followed soon by a more significant update (probably 0.2 version), with improved indexing, netCDF I/O, metadata handling and Dataset functionality. These changes might introduce minor back-compatibility issues, and thus the 0.1.9 release is more useful for those who would have problems using the 0.2 version.
Summary of major changes since 0.1.8:
- bugfix:
- added ne attribute to DimArray (a != b)
- align (reindex) axes involving a None singleton
- dimarray.geo submodule rewritten from scratch (but still largely beta)
- now handles transformation using cartopy
- CF-conform transformation are automatically mapped from proj4
arguments
improved doc and netCDF read
-
new feature: read multiple netCDF4 by providing a regular expression
-
minor bug fixes
-
improved documentation for netCDF I/O, can now be compiled using sphinx
-
also include scripts to convert notebooks to rst files and then html
cd docs
make rst
make html
fewer dependency
compat folder with basemap code to use "interp"
fixed bug: no error when importing module with no netCDF4 installation
operations OK
Solved problem in operations with numpy array as LHS operator (and closed related issue)
dimarray broadcast indexing
A number of bug fixes. Dimarray was used in two big projects and a few remaining bugs were solved, mostly related to multi-dimensional indexing and array broadcasting when indexing. New attribute .box to switch from numpy-like array-broadcasting when indexing to matlab-like multi-dimensional indexing (where several dimensions are indexed independently from each other, as a "box").