From 1f158b051d7fcdaf13f88088c64a7a5eeb944345 Mon Sep 17 00:00:00 2001 From: Lawson Woods Date: Tue, 2 Apr 2024 18:15:42 -0700 Subject: [PATCH] format_hint update --- package/MDAnalysis/coordinates/chain.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/MDAnalysis/coordinates/chain.py b/package/MDAnalysis/coordinates/chain.py index 9454397e794..0c7e20b1d36 100644 --- a/package/MDAnalysis/coordinates/chain.py +++ b/package/MDAnalysis/coordinates/chain.py @@ -372,8 +372,16 @@ def _format_hint(thing): .. versionadded:: 1.0.0 """ + has_zarr = False + try: + import zarr + has_zarr = True + 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):