-
Notifications
You must be signed in to change notification settings - Fork 358
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
Complete NumPy universal functions compat for DataFrames #1127
Conversation
742e285
to
67cd75c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1127 +/- ##
==========================================
+ Coverage 95.15% 95.15% +<.01%
==========================================
Files 35 35
Lines 7017 7039 +22
==========================================
+ Hits 6677 6698 +21
- Misses 340 341 +1
Continue to review full report at Codecov.
|
# Test only top 5 for now. 'compute.ops_on_diff_frames' option increases too much time. | ||
try: | ||
set_option('compute.ops_on_diff_frames', True) | ||
for np_name, spark_func in list(binary_np_spark_mappings.items())[:5]: |
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.
I checked all the tests pass for its complete list.
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.
Hmm, in my local, right_shift
function always fails.
>>> pdf
a b
0 65 83
1 50 -14
2 -95 35
3 98 97
4 -19 52
5 -39 53
6 -60 45
7 37 51
8 -25 7
9 -11 24
10 34 8
11 -53 8
12 -6 -12
13 -40 -71
14 -14 -36
15 -62 -98
16 93 -38
17 -81 56
18 45 27
19 84 97
20 38 46
21 -30 -76
22 -29 -24
23 -69 -67
>>> np.right_shift(pdf, pdf)
a b
0 0 0
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
6 0 0
7 0 0
8 0 0
9 0 0
10 0 0
11 0 0
12 0 0
13 0 0
14 0 0
15 0 0
16 0 0
17 0 0
18 0 0
19 0 0
20 0 0
21 0 0
22 0 0
23 0 0
whereas
>>> np.right_shift(kdf, kdf)
a b
0 32 0
1 0 -1
2 -1 0
3 0 0
4 -1 0
5 -1 0
6 -4 0
7 0 0
8 -1 0
9 -1 0
10 0 0
11 -1 0
12 -1 -1
13 -1 -1
14 -1 -1
15 -16 -1
16 0 -1
17 -1 0
18 0 0
19 0 0
20 0 0
21 -1 -1
22 -1 -1
23 -1 -1
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.
np.right_shift(kdf, 1)
seems fine.
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.
Hm, they are same in my local:
>>> np.right_shift(pdf, pdf)
a b
0 0 0
1 0 0
2 -1 0
3 0 -1
4 -1 0
5 0 0
6 -1 -4
7 -1 -1
8 0 -1
9 16 -1
10 16 -1
11 0 -1
12 -1 -1
13 -1 -1
14 0 -2
15 1 -1
16 -1 0
17 0 -1
18 0 -1
19 0 -1
20 0 -1
21 0 0
22 -1 0
23 0 0
24 -1 -1
25 0 0
26 -1 0
27 -1 0
28 0 -1
29 -8 0
30 0 -1
31 0 -1
32 -1 0
33 0 0
34 0 0
35 -1 0
36 -1 -1
37 0 -1
38 -1 -1
39 0 -2
40 -1 0
41 0 0
42 0 0
43 0 -1
44 0 0
45 -1 0
46 -1 -1
47 0 -1
48 0 -1
49 0 -1
50 -1 -1
51 0 -32
52 0 0
>>> np.right_shift(kdf, kdf)
a b
0 0 0
1 0 0
2 -1 0
3 0 -1
4 -1 0
5 0 0
6 -1 -4
7 -1 -1
8 0 -1
9 16 -1
10 16 -1
11 0 -1
12 -1 -1
13 -1 -1
14 0 -2
15 1 -1
16 -1 0
17 0 -1
18 0 -1
19 0 -1
20 0 -1
21 0 0
22 -1 0
23 0 0
24 -1 -1
25 0 0
26 -1 0
27 -1 0
28 0 -1
29 -8 0
30 0 -1
31 0 -1
32 -1 0
33 0 0
34 0 0
35 -1 0
36 -1 -1
37 0 -1
38 -1 -1
39 0 -2
40 -1 0
41 0 0
42 0 0
43 0 -1
44 0 0
45 -1 0
46 -1 -1
47 0 -1
48 0 -1
49 0 -1
50 -1 -1
51 0 -32
52 0 0
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.
Seems versions matter ... (?)
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.
I will investigate it separately in another PR.
67cd75c
to
1737eb0
Compare
Softagram Impact Report for pull/1127 (head commit: 1737eb0)
|
This PR proposes to complete NumPy's universal functions support against DataFrame.