Skip to content

Commit

Permalink
add cast to W for current mvlisa implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwolf committed Aug 15, 2024
1 parent acd8415 commit 0b62548
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions esda/moran_local_mv.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def __init__(
"""
self._mvquads = mvquads
y = np.asarray(y).reshape(-1, 1)
if hasattr(W, "to_W"):
W = W.to_W()
W.transform = "r"
y = y - y.mean()
if unit_scale:
Expand Down Expand Up @@ -307,6 +309,8 @@ def __init__(
X /= X.std(axis=0)
self.y = y
self.X = X
if hasattr(W, "to_W"):
W = W.to_W()
W.transform = "r"
self.W = W
y_filtered_ = self.y_filtered_ = self._part_regress_transform(y, X)
Expand Down

0 comments on commit 0b62548

Please sign in to comment.