Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cudf | |
if not (cudf.Scalar(2) > cudf.Scalar(3)): | |
# evaluates to “if not cudf.Scalar(False)” | |
print("It works!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A(object): | |
pass | |
a = A() | |
if a: | |
print("uh oh!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cudf | |
# an invalid op | |
x = cudf.Scalar('hello world!') | |
y = cudf.Scalar(42) | |
print(x + y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cudf | |
# a valid op | |
x = cudf.Scalar('2011-01-01', dtype='datetime64[ns]') | |
y = cudf.Scalar(100, dtype='timedelta64[ms]') | |
print(x + y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cudf | |
val = cudf.Scalar(12, dtype="int8") | |
print(val) | |
str_val = cudf.Scalar("hello", dtype="str") | |
print(str_val) | |
datetime_val = cudf.Scalar("2011-01-01", dtype="datetime64[ns]") | |
print(datetime_val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cudf | |
val = cudf.Scalar(1) | |
print(val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cudf | |
sr1 = cudf.Series([1,2,3]) | |
sr2 = cudf.Series([2,3,4]) | |
val = cudf.Scalar(1) # construct a cuDF scalar | |
result_1 = sr1 + val | |
result_2 = sr2 – val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sr1 = cudf.Series([1,2,3]) | |
sr2 = cudf.Series([2,3,4]) | |
val = 1 | |
result_1 = sr1 + val | |
result_2 = sr2 – val |
NewerOlder