-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
towards new h5netcdf/netcdf4 features #9509
Changes from all commits
a117fbc
6108e05
0a94f17
26e8827
9b5a157
ec83935
2f7af43
b78c42e
074c8c5
9589c56
6269ae9
2d12d54
98e5071
c879a09
63fd322
dce4539
74d3958
bbba5cf
ffdeb0d
3a87272
dd35484
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1213,6 +1213,7 @@ def to_netcdf( | |
*, | ||
multifile: Literal[True], | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> tuple[ArrayWriter, AbstractDataStore]: ... | ||
|
||
|
||
|
@@ -1230,6 +1231,7 @@ def to_netcdf( | |
compute: bool = True, | ||
multifile: Literal[False] = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does Should we also consider defaulting to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, not sure, if I handled that correctly. It's more or less a security measure against feeding the kwarg to versions which can't handle those yet. I think this was the simplest solution without adding a whole bunch of boilerplate code. But maybe there is an easier solution to that. |
||
) -> bytes: ... | ||
|
||
|
||
|
@@ -1248,6 +1250,7 @@ def to_netcdf( | |
compute: Literal[False], | ||
multifile: Literal[False] = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> Delayed: ... | ||
|
||
|
||
|
@@ -1265,6 +1268,7 @@ def to_netcdf( | |
compute: Literal[True] = True, | ||
multifile: Literal[False] = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> None: ... | ||
|
||
|
||
|
@@ -1283,6 +1287,7 @@ def to_netcdf( | |
compute: bool = False, | ||
multifile: Literal[False] = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> Delayed | None: ... | ||
|
||
|
||
|
@@ -1301,6 +1306,7 @@ def to_netcdf( | |
compute: bool = False, | ||
multifile: bool = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> tuple[ArrayWriter, AbstractDataStore] | Delayed | None: ... | ||
|
||
|
||
|
@@ -1318,6 +1324,7 @@ def to_netcdf( | |
compute: bool = False, | ||
multifile: bool = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> tuple[ArrayWriter, AbstractDataStore] | bytes | Delayed | None: ... | ||
|
||
|
||
|
@@ -1333,6 +1340,7 @@ def to_netcdf( | |
compute: bool = True, | ||
multifile: bool = False, | ||
invalid_netcdf: bool = False, | ||
auto_complex: bool | None = None, | ||
) -> tuple[ArrayWriter, AbstractDataStore] | bytes | Delayed | None: | ||
"""This function creates an appropriate datastore for writing a dataset to | ||
disk as a netCDF file | ||
|
@@ -1400,6 +1408,9 @@ def to_netcdf( | |
raise ValueError( | ||
f"unrecognized option 'invalid_netcdf' for engine {engine}" | ||
) | ||
if auto_complex is not None: | ||
kwargs["auto_complex"] = auto_complex | ||
|
||
kmuehlbauer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
store = store_open(target, mode, format, group, **kwargs) | ||
|
||
if unlimited_dims is None: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It boils down, that we are approaching feature equality between netcdf4-python and h5netcdf. It seems, that only reference objects can't be handled by netcdf-c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: check boolean enums