Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ openpmd_viewer.egg-info/
.cache/
.eggs/
.vs/
__pycache__
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added because they keep showing up in my git status

Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def get_data(series, record_component, i_slice=None, pos_slice=None,
chunks = record_component.available_chunks()

if pos_slice is None:
# mask invalid regions with zero
data = np.zeros_like(record_component)
# mask invalid regions with NaN
data = np.full_like(record_component, np.nan)
for chunk in chunks:
chunk_slice = chunk_to_slice(chunk)
# read only valid region
Expand All @@ -76,8 +76,8 @@ def get_data(series, record_component, i_slice=None, pos_slice=None,
for dir_index in pos_slice_sorted: # remove indices in list
del slice_shape[dir_index]

# mask invalid regions with zero
data = np.zeros(slice_shape, dtype=output_type)
# mask invalid regions with NaN
data = np.full(slice_shape, np.nan, dtype=output_type)

# build requested ND slice with respect to full data
s = []
Expand Down