Skip to content

Commit a45fffb

Browse files
committed
add back size check
1 parent 00794ff commit a45fffb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/probabilit/iman_conover.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ def __init__(self, correlation_matrix):
9898
def __call__(self, X):
9999
"""Transform an input matrix X.
100100
101-
The output will have the same marginal distributions, but with
102-
induced correlation.
103-
104101
Parameters
105102
----------
106103
X : ndarray
@@ -127,6 +124,10 @@ def __call__(self, X):
127124
msg += f"correlation matrix ({self.P.shape})"
128125
raise ValueError(msg)
129126

127+
if N <= K:
128+
msg = f"The matrix X must have rows > columns. Got shape: {X.shape}"
129+
raise ValueError(msg)
130+
130131
# Remove existing mean and std from marginal distributions
131132
mean = np.mean(X, axis=0)
132133
std = np.std(X, axis=0)

0 commit comments

Comments
 (0)