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
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.info("Using int64 for out_dtype because n_rows * n_cols >= INT_MAX")

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