Skip to content

Commit

Permalink
ensure smrt matrix are float64, not int64
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Aug 27, 2019
1 parent bcffc5b commit 0191203
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smrt/core/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def compress(self, mode=None, auto_reduce_npol=False):
"""
if self.values is 0:
return 0
return 0.

if self.mtype == "dense5":
if mode is not None:
Expand Down Expand Up @@ -255,7 +255,7 @@ def __abs__(self):

def __getitem__(self, key):
if self.values is 0:
return 0
return 0.
else:
return self.values[key]

Expand All @@ -265,7 +265,7 @@ def __setitem__(self, key, v):
@property
def diagonal(self):
if self.values is 0:
return np.array([0])
return np.array([0.])
if self.mtype.startswith("diagonal"):
return self.values
else:
Expand Down

0 comments on commit 0191203

Please sign in to comment.