Skip to content
Merged
Changes from 2 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
5 changes: 5 additions & 0 deletions python/cuml/cuml/cluster/dbscan.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import numpy as np

from cuml.common.array_descriptor import CumlArrayDescriptor
from cuml.common.doc_utils import generate_docstring
from cuml.internals import logger
from cuml.internals.array import CumlArray
from cuml.internals.base import Base
from cuml.internals.input_utils import input_to_cuml_array
Expand Down Expand Up @@ -344,6 +345,10 @@ class DBSCAN(Base,
check_dtype=[np.float32, np.float64]
)

if n_rows * n_cols > (2**31 - 1):
out_dtype = "int64"
logger.warn("Using int64 for out_dtype because n_rows * n_cols >= INT_MAX")
Comment thread
divyegala marked this conversation as resolved.
Outdated

if n_rows == 0 or n_cols == 0:
raise ValueError(
f"DBSCAN requires at least one row and one column to fit, "
Expand Down
Loading