Skip to content

CI: Unpin NumPy #23465

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

Merged
merged 5 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/travis-37-numpydev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ dependencies:
- "git+git://github.com/dateutil/dateutil.git"
- "-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
- "--pre"
- "numpy<=1.16.0.dev0+20181015190246"
- "numpy"
- "scipy"
7 changes: 5 additions & 2 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ def first_not_none(values):
if (isinstance(v.index, MultiIndex) or
key_index is None or
isinstance(key_index, MultiIndex)):
stacked_values = np.vstack(map(np.asarray, values))
stacked_values = np.vstack([
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case you didn't follow the issue, the original failure came from us passing generator expressions to vstack, and the new __array_function__ stuff in NumPy dev exhausted those generators. So we just build a list instead (which NumPy was doing anyway)

Copy link
Contributor

Choose a reason for hiding this comment

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

yep saw that

np.asarray(v) for v in values
])
result = DataFrame(stacked_values, index=key_index,
columns=index)
else:
Expand All @@ -422,7 +424,8 @@ def first_not_none(values):
axis=self.axis).unstack()
result.columns = index
else:
stacked_values = np.vstack(map(np.asarray, values))
stacked_values = np.vstack([np.asarray(v)
for v in values])
result = DataFrame(stacked_values.T, index=v.index,
columns=key_index)

Expand Down
6 changes: 4 additions & 2 deletions pandas/util/_test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ def _skip_if_not_us_locale():


def _skip_if_no_scipy():
return not (safe_import('scipy.stats') and safe_import('scipy.sparse') and
safe_import('scipy.interpolate'))
return not (safe_import('scipy.stats') and
safe_import('scipy.sparse') and
safe_import('scipy.interpolate') and
safe_import('scipy.signal'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not entirely sure why, but importing here should avoid the test failure. I suspect that whatever modifications pytest makes to the warningsfilter isn't active at this point (in the fixture), so the warning about the dtype size changing isn't elevated to an error.



def _skip_if_no_lzma():
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ split_penalty_after_opening_bracket = 1000000
split_penalty_logical_operator = 30

[tool:pytest]
minversion = 3.6
testpaths = pandas
markers =
single: mark a test as single cpu only
Expand Down