Skip to content
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

feat(api): implement __array__ #4547

Merged
merged 2 commits into from
Sep 21, 2022

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Sep 21, 2022

This PR adds an implementation of __array__ for Column and Table expressions.

There's hardly any code here, but this gives the ability to plot ibis expressions out of the box.

Here's an example:

image

which yields this plot:

image

@cpcloud cpcloud added feature Features or general enhancements ux User experience related issues labels Sep 21, 2022
@cpcloud
Copy link
Member Author

cpcloud commented Sep 21, 2022

cc @jcmkk3, I think this is a good first step on the way to being able to interop with seaborn and possibly other libraries.

@cpcloud cpcloud added this to the 4.0.0 milestone Sep 21, 2022
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #4547 (504e103) into master (c2b635a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4547   +/-   ##
=======================================
  Coverage   92.53%   92.54%           
=======================================
  Files         183      183           
  Lines       19994    20002    +8     
  Branches     2961     2961           
=======================================
+ Hits        18502    18510    +8     
  Misses       1116     1116           
  Partials      376      376           
Impacted Files Coverage Δ
ibis/backends/datafusion/compiler.py 96.83% <100.00%> (+0.04%) ⬆️
ibis/expr/types/generic.py 90.94% <100.00%> (+0.07%) ⬆️
ibis/expr/types/relations.py 94.39% <100.00%> (+0.03%) ⬆️

Copy link
Member

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@cpcloud cpcloud enabled auto-merge (rebase) September 21, 2022 12:43
@github-actions
Copy link
Contributor

Test Results

       6 files         6 suites   4m 27s ⏱️
3 172 tests 3 158 ✔️ 14 💤 0
9 510 runs  9 468 ✔️ 42 💤 0

Results for commit 504e103.

@cpcloud cpcloud enabled auto-merge (rebase) September 21, 2022 12:49
@cpcloud cpcloud merged commit 1ddc876 into ibis-project:master Sep 21, 2022
@cpcloud cpcloud deleted the simple-dunder-array branch October 23, 2022 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features or general enhancements ux User experience related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants