Skip to content

Commit

Permalink
Fix by using isinstance.
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Oct 24, 2023
1 parent 455d8ce commit 452213f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phono3py/phonon3/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,13 +846,13 @@ def delete_interaction_strength(self):

def _set_fc3(self, fc3):
if (
type(fc3) == np.ndarray
isinstance(fc3, np.ndarray)
and fc3.dtype == np.dtype("double")
and fc3.flags.aligned
and fc3.flags.owndata
and fc3.flags.c_contiguous
and self._frequency_scale_factor is None
): # noqa E129
):
self._fc3 = fc3
elif self._frequency_scale_factor is None:
self._fc3 = np.array(fc3, dtype="double", order="C")
Expand Down

0 comments on commit 452213f

Please sign in to comment.