From b82fc404ef08d6c19335092db91cb3dae17ceec9 Mon Sep 17 00:00:00 2001 From: didillysquat Date: Mon, 7 Sep 2020 03:35:45 +0300 Subject: [PATCH] #115 fix no setter for wu.data --- distance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distance.py b/distance.py index 98aa005..0744974 100644 --- a/distance.py +++ b/distance.py @@ -169,8 +169,8 @@ def _rescale_array(max_val, min_val): def _scale_and_compute_pcoa(self, wu): dist_array_scaler = self._rescale_array(max_val=wu.data.max(), min_val=wu.data.min()) - wu.data = wu.data * dist_array_scaler - pcoa_output = pcoa(wu.data) + wu_data = wu.data * dist_array_scaler + pcoa_output = pcoa(wu_data) # When the pcoa calculation converts very small eigen values to 0 # In doing this, if there were not large enougher eigen values, # the sum of the eigen values will add to 0. This will cause a TrueDivide error.