Skip to content

Commit

Permalink
responding to kacper comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Goldbaum committed Jun 1, 2017
1 parent 4f741e9 commit ddc53cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/source/examining/loading_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ to the z direction.

.. code-block:: python
ds.index
ad = ds.all_data()
print(ds.field_info[('raw', 'Ex')].nodal_flag)
print(ad['raw', 'Ex'].shape)
Expand Down Expand Up @@ -461,6 +462,7 @@ are normal to the z direction.

.. code-block:: python
ds.index
ad = ds.all_data()
print(ds.field_info[('enzo', 'Ex')].nodal_flag)
print(ad['raw', 'Ex'].shape)
Expand Down
4 changes: 1 addition & 3 deletions yt/frontends/enzo/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ def io_iter(self, chunks, fields):
filename = obj.filename
for field in fields:
nodal_flag = self.ds.field_info[field].nodal_flag
dims = obj.ActiveDimensions[::-1].copy()
if np.any(nodal_flag):
dims += nodal_flag[::-1]
dims = obj.ActiveDimensions[::-1] + nodal_flag[::-1]
data = np.empty(dims, dtype=h5_dtype)
yield field, obj, self._read_obj_field(
obj, field, (fid, data))
Expand Down
2 changes: 1 addition & 1 deletion yt/utilities/io_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _read_fluid_selection(self, chunks, selector, fields, size):
for field, obj, data in self.io_iter(chunks, fields):
if data is None:
continue
if selector.__class__ is GridSelector and field not in nodal_fields:
if isinstance(selector, GridSelector) and field not in nodal_fields:
ind[field] += data.size
rv[field] = data.copy()
else:
Expand Down

0 comments on commit ddc53cb

Please sign in to comment.