diff --git a/docs/source/conf.py b/docs/source/conf.py index 7efebfb8d2..324be8a0fd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -106,7 +106,6 @@ def generate_apidocs(*args): # html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] html_theme_options = { "external_links": [{"url": "https://github.com/Project-MONAI/tutorials", "name": "Tutorials"}], - "collapse_navigation": True, "icon_links": [ { "name": "GitHub", diff --git a/monai/data/csv_saver.py b/monai/data/csv_saver.py index c79cd1016a..62f407bfd5 100644 --- a/monai/data/csv_saver.py +++ b/monai/data/csv_saver.py @@ -87,7 +87,6 @@ def save(self, data: Union[torch.Tensor, np.ndarray], meta_data: Optional[Dict] """ save_key = meta_data[Key.FILENAME_OR_OBJ] if meta_data else str(self._data_index) self._data_index += 1 - data_: np.ndarray if isinstance(data, torch.Tensor): data = data.detach().cpu().numpy() self._cache_dict[save_key] = np.asarray(data, dtype=float) diff --git a/monai/engines/workflow.py b/monai/engines/workflow.py index 4e1834a625..de3e00c83e 100644 --- a/monai/engines/workflow.py +++ b/monai/engines/workflow.py @@ -149,6 +149,7 @@ def set_sampler_epoch(engine: Engine): self.prepare_batch = prepare_batch self.metric_cmp_fn = metric_cmp_fn self.amp = amp + self.scaler = None if event_names is None: event_names = [IterationEvents] diff --git a/monai/transforms/io/array.py b/monai/transforms/io/array.py index 2c1a3c89ff..a8e9ed1e7c 100644 --- a/monai/transforms/io/array.py +++ b/monai/transforms/io/array.py @@ -45,7 +45,7 @@ def switch_endianness(data, new="<"): """ if isinstance(data, np.ndarray): # default to system endian - sys_native = ((sys.byteorder == "little") and "<") or ">" + sys_native = "<" if (sys.byteorder == "little") else ">" current_ = sys_native if data.dtype.byteorder not in ("<", ">") else data.dtype.byteorder if new not in ("<", ">"): raise NotImplementedError(f"Not implemented option new={new}.")