Skip to content

Commit

Permalink
fixing bug in rvs
Browse files Browse the repository at this point in the history
  • Loading branch information
tfm000 committed Dec 1, 2023
1 parent 290b59c commit 386f0b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sklarpy/copulas/_prefit_dists.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,13 +803,13 @@ def copula_rvs(self, size: int, copula_params: Union[Params, tuple],
raw_mv_rvs: np.ndarray = self._mv_object.rvs(size, copula_params)

# bounding these above and below
eps: float = 10 ** -5
rvs_df: pd.DataFrame = pd.DataFrame(raw_mv_rvs)
rvs_df[rvs_df < 0] = eps
rvs_df[rvs_df > 1] = 1 - eps
mv_rvs: np.ndarray = rvs_df.to_numpy()
# eps: float = 10 ** -5
# rvs_df: pd.DataFrame = pd.DataFrame(raw_mv_rvs)
# rvs_df[rvs_df < 0] = eps
# rvs_df[rvs_df > 1] = 1 - eps
# mv_rvs: np.ndarray = rvs_df.to_numpy()

return self._g_to_u(mv_rvs, copula_params)
return self._g_to_u(raw_mv_rvs, copula_params)

def _get_components_summary(self,
fitted_mv_object: FittedContinuousMultivariate,
Expand Down

0 comments on commit 386f0b4

Please sign in to comment.