Skip to content

Commit

Permalink
Merge pull request #192 from weikang9009/arraybug
Browse files Browse the repository at this point in the history
fix ValueError: setting an array element with a sequence
  • Loading branch information
jGaboardi committed May 30, 2023
2 parents d8bb904 + 0d7f6fa commit dad3f8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion giddy/markov.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ def S(self):
for i, p in enumerate(self.P):
_S.append(steady_state(p))
# if np.array(_S).dtype is np.dtype('O'):
self._S = np.asarray(_S)
self._S = np.asarray(_S, dtype=object)
return self._S

@property
Expand Down
3 changes: 1 addition & 2 deletions giddy/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import scipy.spatial.distance as d
from .markov import Markov


class Sequence(object):
"""
Pairwise sequence analysis.
Expand Down Expand Up @@ -168,7 +167,7 @@ def __init__(self, y, subs_mat=None, dist_type=None, indel=None, cluster_type=No
y_int = []
for yi in y:
y_int.append(list(map(self.label_dict.get, yi)))
y_int = np.array(y_int)
y_int = np.array(y_int, dtype=object)

if subs_mat is None or indel is None:
if dist_type is None:
Expand Down

0 comments on commit dad3f8a

Please sign in to comment.