Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Melina97 committed Aug 12, 2021
1 parent 93a88c3 commit 315d5f5
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions pyop2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1627,12 +1627,6 @@ def zero(self, subset=None):
"""Zero the data associated with this :class:`Dat`
:arg subset: A :class:`Subset` of entries to zero (optional)."""
<<<<<<< HEAD
if subset is None:
self.data[:] = 0
else:
self.data[subset.indices] = 0
=======
# If there is no subset we can safely zero the halo values.
if subset is None:
self._data[:] = 0
Expand All @@ -1641,7 +1635,6 @@ def zero(self, subset=None):
raise MapValueError("The subset and dataset are incompatible")
else:
self.data[subset.owned_indices] = 0
>>>>>>> origin/master

@collective
def copy(self, other, subset=None):
Expand All @@ -1652,11 +1645,6 @@ def copy(self, other, subset=None):
if other is self:
return
if subset is None:
<<<<<<< HEAD
other.data[:] = self.data_ro
else:
other.data[subset.indices] = self.data_ro[subset.indices]
=======
# If the current halo is valid we can also copy these values across.
if self.halo_valid:
other._data[:] = self._data
Expand All @@ -1667,7 +1655,6 @@ def copy(self, other, subset=None):
raise MapValueError("The subset and dataset are incompatible")
else:
other.data[subset.owned_indices] = self.data_ro[subset.owned_indices]
>>>>>>> origin/master

def __iter__(self):
"""Yield self when iterated over."""
Expand Down Expand Up @@ -1879,17 +1866,7 @@ def __imul__(self, other):

def __itruediv__(self, other):
"""Pointwise division or scaling of fields."""
<<<<<<< HEAD
from numbers import Number
if isinstance(other, Number):
self.data[:] /= other
else:
self._check_shape(other)
np.true_divide(self.data[:], other.data_ro, out=self.data[:], casting="unsafe")
return self
=======
return self._iop(other, operator.itruediv)
>>>>>>> origin/master

@collective
def global_to_local_begin(self, access_mode):
Expand Down

0 comments on commit 315d5f5

Please sign in to comment.