likelihood 1.5.6__py3-none-any.whl → 1.5.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
likelihood/tools/tools.py CHANGED
@@ -653,7 +653,7 @@ def cal_average(y: np.ndarray, alpha: float = 1):
653
653
  class DataScaler:
654
654
  """numpy array `scaler` and `rescaler`"""
655
655
 
656
- __slots__ = ["dataset_", "_n", "data_scaled", "values", "transpose", "inv_fitting"]
656
+ __slots__ = ["dataset_", "_n", "data_scaled", "values", "inv_fitting"]
657
657
 
658
658
  def __init__(self, dataset: np.ndarray, n: int = 1) -> None:
659
659
  """Initializes the parameters required for scaling the data"""
@@ -695,11 +695,6 @@ class DataScaler:
695
695
  msg = "Trying to access an item at an invalid index."
696
696
  print(f"{error_type}: {msg}")
697
697
  return None
698
- if self.dataset_.shape[0] > self.dataset_.shape[1]:
699
- self.dataset_ = self.dataset_.T
700
- self.transpose = True
701
- else:
702
- self.transpose = False
703
698
  for i in range(self.dataset_.shape[0]):
704
699
  if self._n != None:
705
700
  fit = np.polyfit(xaxis, self.dataset_[i, :], self._n)
@@ -737,14 +732,13 @@ class DataScaler:
737
732
  dataset_ : `np.array`
738
733
  An array containing the rescaled data.
739
734
  """
740
- if self.transpose:
741
- dataset_ = dataset_.T
742
735
  for i in range(dataset_.shape[0]):
743
736
  dataset_[i, :] += 1
744
737
  dataset_[i, :] /= 2
745
738
  dataset_[i, :] = dataset_[i, :] * self.values[1][i]
746
739
  dataset_[i, :] += self.values[0][i]
747
- dataset_[i, :] += self.values[2][i](range(dataset_.shape[1]))
740
+ if self._n != None:
741
+ dataset_[i, :] += self.values[2][i](range(dataset_.shape[1]))
748
742
 
749
743
  return dataset_
750
744
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: likelihood
3
- Version: 1.5.6
3
+ Version: 1.5.7
4
4
  Summary: A package that performs the maximum likelihood algorithm.
5
5
  Home-page: https://github.com/jzsmoreno/likelihood/
6
6
  Author: J. A. Moreno-Guerra
@@ -17,9 +17,9 @@ likelihood/tools/figures.py,sha256=waF0NHIMrctCmaLhcuz5DMcXyRKynmn6aG0XITYCTLc,1
17
17
  likelihood/tools/impute.py,sha256=n87Tv-xLUAdPl7BQLFcLWSsXBZbXksahyCayJWMydXc,9485
18
18
  likelihood/tools/models_tools.py,sha256=c3-vac-1MYSarYDtfR6XfVC7X_WY9auS7y2_3Z973IQ,8875
19
19
  likelihood/tools/numeric_tools.py,sha256=Hwf-lbqROqPPZ9N7eVzKIDyZxFGQdP53isWxPqpG0eo,12254
20
- likelihood/tools/tools.py,sha256=FyldbmYNgt4gK89BKgDsya2_EIENwZZwdbBx5pfNhj4,42281
21
- likelihood-1.5.6.dist-info/licenses/LICENSE,sha256=XWHWt9egYEUHGPTnlcZfJKLPmysacOwdiLj_-J7Z9ew,1066
22
- likelihood-1.5.6.dist-info/METADATA,sha256=IJzmaE3NJnldHUYUPJNnLjS8cpPYoCKCJ6LfdYJWLxA,2883
23
- likelihood-1.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
- likelihood-1.5.6.dist-info/top_level.txt,sha256=KDiBLr870YTxqLFqObTOSrTK10uw8dFsITSNLlte3PA,11
25
- likelihood-1.5.6.dist-info/RECORD,,
20
+ likelihood/tools/tools.py,sha256=lk9BIskjUKYQ1XVwARm9jAjHuLQ4UO68aZY8oxkzk5c,42056
21
+ likelihood-1.5.7.dist-info/licenses/LICENSE,sha256=XWHWt9egYEUHGPTnlcZfJKLPmysacOwdiLj_-J7Z9ew,1066
22
+ likelihood-1.5.7.dist-info/METADATA,sha256=V8yQ5NJPbMyxOB7sICsp5QCkZ8MZhxkfS-4WCWMrFG0,2883
23
+ likelihood-1.5.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
+ likelihood-1.5.7.dist-info/top_level.txt,sha256=KDiBLr870YTxqLFqObTOSrTK10uw8dFsITSNLlte3PA,11
25
+ likelihood-1.5.7.dist-info/RECORD,,