Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/kde1d/kde1d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,15 +814,15 @@ Kde1d::check_xmin_xmax(const double& xmin, const double& xmax) const
inline void
Kde1d::check_fitted() const
{
if (std::isnan(loglik_)) {
if (grid_.get_grid_points().size() == 0) {
throw std::runtime_error("You must first fit the KDE to data.");
}
}

inline void
Kde1d::check_notfitted() const
{
if (!std::isnan(loglik_)) {
if (grid_.get_grid_points().size() > 0) {
throw std::runtime_error(
"This method can't be used for already fitted objects.");
}
Expand Down
Loading