Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Erik van Sebille <erikvansebille@gmail.com>
  • Loading branch information
CKehl and erikvansebille committed Jan 4, 2022
1 parent c4c9f5e commit 4b4f8f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions parcels/particleset/particlesetnodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def data_indices(self, variable_name, compare_values, invert=False):
*not implemented*, as node-based data structure is _not_ index-based.
Please use 'data_ids' or 'data_nodes'
"""
raise NotImplementedError("'data_indices' function shall not be used as the node-based structure is not indexable.")
raise NotImplementedError("'data_indices' function cannot be used as the node-based structure is not indexable.")

def data_ids(self, variable_name, compare_values, invert=False):
"""Get the ID's of all particles where the value of
Expand Down Expand Up @@ -508,7 +508,7 @@ def populate_indices(self):
Functionality:
*not implemented*, as node-based data structure is _not_ index-based.
"""
raise NotImplementedError("'populate_indices' function shall not be used as the node-based structure is not indexable.")
raise NotImplementedError("'populate_indices' function cannot be used as the node-based structure is not indexable.")

def cptr(self, index):
return self._collection.cptr(index)
Expand Down
4 changes: 2 additions & 2 deletions parcels/particleset/particlesetsoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def split_by_index(self, indices):
The reason for it can, for example, be that the set exceeds a pre-defined maximum number of elements, which for
performance reasons mandates a split.
The function shall return the newly created or extended Particle collection, i.e. either the collection that
The function returns the newly created or extended Particle collection, i.e. either the collection that
results from a collection split or this very collection, containing the newly-split particles.
"""
super().split_by_index(indices)
Expand All @@ -632,7 +632,7 @@ def split_by_id(self, ids):
The reason for it can, for example, be that the set exceeds a pre-defined maximum number of elements, which for
performance reasons mandates a split.
The function shall return the newly created or extended Particle collection, i.e. either the collection that
The function returns the newly created or extended Particle collection, i.e. either the collection that
results from a collection split or this very collection, containing the newly-split particles.
"""
super().split_by_id(ids)
Expand Down

0 comments on commit 4b4f8f2

Please sign in to comment.