FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/tests/test_rapids.py at main · hokbin/docker-python · GitHub
hokbin
/
docker-python
Public
forked from
Kaggle/docker-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
tests
/
test_rapids.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (16 loc) · 572 Bytes
Breadcrumbs
docker-python
/
tests
/
test_rapids.py
Copy path
File metadata and controls
22 lines (16 loc) · 572 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import
unittest
from
common
import
gpu_test
class
TestRapids
(
unittest
.
TestCase
):
@
gpu_test
def
test_dbscan
(
self
):
import
cudf
from
cuml
.
cluster
import
DBSCAN
# Create and populate a GPU DataFrame
gdf_float
=
cudf
.
DataFrame
()
gdf_float
[
'0'
]
=
[
1.0
,
2.0
,
5.0
]
gdf_float
[
'1'
]
=
[
4.0
,
2.0
,
1.0
]
gdf_float
[
'2'
]
=
[
4.0
,
2.0
,
1.0
]
# Setup and fit clusters
dbscan_float
=
DBSCAN
(
eps
=
1.0
,
min_samples
=
1
)
dbscan_float
.
fit
(
gdf_float
)
self
.
assertEqual
(
3
,
dbscan_float
.
labels_
.
size
)
Back
|
FazBrowse Home
|
New Git URL