-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial support for ibis.random function #2060
Changes from 4 commits
fe80aed
295b950
461d7fc
dfc72f7
230d4e0
d1a3de0
8d13bc0
ec1671f
0386dea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2450,6 +2450,11 @@ def output_type(self): | |
return dt.timestamp.scalar_type() | ||
|
||
|
||
class Random(Constant): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this could be RandomScalar. you could eventually expand this to a column op as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jrbourbeau do you still have any interesting on moving this forward? let me know if you need any help! thanks for having been working on that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies for the delayed response. I've made updates in response to @jreback's initial feedback, please let me know if there's anything else you'd like me to include in this PR |
||
def output_type(self): | ||
return dt.float64.scalar_type() | ||
|
||
|
||
class E(Constant): | ||
def output_type(self): | ||
return functools.partial(ir.FloatingScalar, dtype=dt.float64) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's create a ibis.expr.random; the goal is to produce a random scalar yes? reference the documentation https://docs.python.org/3/library/random.html, which i assume is the goal here.