From 0987ebbb085c597fb36ec25a9ba9cc6b99f66ff1 Mon Sep 17 00:00:00 2001 From: Gui0delp Date: Mon, 26 Feb 2024 21:33:44 +0100 Subject: [PATCH] :bug: fix bug from issue 18, about AttributeError: module 'numpy' has no attribute 'complex' --- connector.py | 2 +- tuner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connector.py b/connector.py index c9cdc10..a84cccc 100644 --- a/connector.py +++ b/connector.py @@ -51,7 +51,7 @@ def __init__(self, data): self.y_std = np.std(data[:, 1], axis=0) ratio = 4.0/3.0 # (Number of SOM unit) / (Number of points) - self.w = np.zeros(int(data.shape[0]*ratio), dtype=np.complex) + self.w = np.zeros(int(data.shape[0]*ratio), dtype=np.cdouble) @property diff --git a/tuner.py b/tuner.py index 9c0e560..5a71b0d 100644 --- a/tuner.py +++ b/tuner.py @@ -30,7 +30,7 @@ def roll_to_max_distance(self, order): def permute(self, index, order): - tests = np.empty((self.size, self.size), dtype=np.int) + tests = np.empty((self.size, self.size), dtype=np.int_) num = order[index] base = np.delete(order, index)