Skip to content
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

Compatibility with Zarr Trajectory format #4557

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions package/MDAnalysis/coordinates/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,16 @@

.. versionadded:: 1.0.0
"""
has_zarr = False
try:
import zarr
has_zarr = True

Check warning on line 393 in package/MDAnalysis/coordinates/chain.py

View check run for this annotation

Codecov / codecov/patch

package/MDAnalysis/coordinates/chain.py#L393

Added line #L393 was not covered by tests
except ImportError:
pass

return (not isinstance(thing, np.ndarray) and
util.iterable(thing) and
(not has_zarr or not isinstance(thing, zarr.Group)) and
not util.isstream(thing))

def _get_local_frame(self, k) -> Tuple[int, int]:
Expand Down
Loading