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

DEPR: allow options for using bottleneck/numexpr #16157

Merged
merged 6 commits into from
Apr 27, 2017

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Apr 27, 2017

deprecate pd.computation.expressions.set_use_numexpr()

supersedes #16140

@jreback jreback added API Design Deprecate Functionality to remove in pandas labels Apr 27, 2017
@jreback jreback added this to the 0.20.0 milestone Apr 27, 2017
@codecov
Copy link

codecov bot commented Apr 27, 2017

Codecov Report

Merging #16157 into master will increase coverage by 0.01%.
The diff coverage is 76.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16157      +/-   ##
==========================================
+ Coverage   90.85%   90.87%   +0.01%     
==========================================
  Files         159      162       +3     
  Lines       50783    50816      +33     
==========================================
+ Hits        46141    46178      +37     
+ Misses       4642     4638       -4
Flag Coverage Δ
#multiple 88.65% <75%> (+0.01%) ⬆️
#single 40.33% <61.11%> (+0.01%) ⬆️
Impacted Files Coverage Δ
pandas/io/formats/format.py 95.66% <ø> (+0.61%) ⬆️
pandas/computation/expressions.py 0% <0%> (ø)
pandas/core/frame.py 97.59% <100%> (ø) ⬆️
pandas/types/concat.py 100% <100%> (ø)
pandas/core/nanops.py 98.2% <100%> (+0.02%) ⬆️
pandas/core/computation/expressions.py 92.68% <100%> (+0.05%) ⬆️
pandas/core/indexes/base.py 96.2% <100%> (ø) ⬆️
pandas/io/formats/console.py 69.69% <69.69%> (ø)
pandas/core/config_init.py 94.28% <83.33%> (-1.07%) ⬇️
pandas/core/common.py 90.68% <0%> (-0.35%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8879e84...bb5af81. Read the comment docs.


use_bottleneck_doc = """
: bool
Use the bottleneck library to accelearte if its installed, default is True
Copy link
Contributor

Choose a reason for hiding this comment

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

accelerate

deprecate pd.computation.expressions.set_use_numexpr()
@jreback
Copy link
Contributor Author

jreback commented Apr 27, 2017

cc @jorisvandenbossche
cc @dhirschfeld
cc @shoyer

@dhirschfeld
Copy link
Contributor

LGTM

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Can you add a whatsnew notice for the two new options?

@@ -425,6 +425,10 @@ mode.use_inf_as_null False True means treat None, NaN, -IN
INF as null (old way), False means
None and NaN are null, but INF, -INF
are not null (new way).
compute.use_bottleneck True Use the bottleneck library to accelerate
computation if its installed
Copy link
Member

Choose a reason for hiding this comment

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

its -> it is

compute.use_bottleneck True Use the bottleneck library to accelerate
computation if its installed
compute.use_numexpr True Use the numexpr library to accelerate
computation if its installed
Copy link
Member

Choose a reason for hiding this comment

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

same here


use_bottleneck_doc = """
: bool
Use the bottleneck library to accelearte if its installed, default is True
Copy link
Member

Choose a reason for hiding this comment

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

same here and below about 'its'

# set/unset to use bottleneck
global _USE_BOTTLENECK
if _BOTTLENECK_INSTALLED:
_USE_BOTTLENECK = v
Copy link
Member

Choose a reason for hiding this comment

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

Should we warn here if v is False and bottleneck is not installed ?

@jreback
Copy link
Contributor Author

jreback commented Apr 27, 2017

  • updated for comments
  • added deprecation warning for union_categoricals
  • docs & tests for new compute.use* options

@@ -35,6 +36,9 @@ def set_use_numexpr(v=True):
global _USE_NUMEXPR
if _NUMEXPR_INSTALLED:
_USE_NUMEXPR = v
elif v:
warnings.warn("trying to set the option to use numexpr, "
"but it is not installed!")
Copy link
Member

Choose a reason for hiding this comment

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

I know I suggested this, but, I think this one will be triggered by default if you don't have numexpr installed? (just by importing pandas, I mean, not only when setting the option manually when you don't have it installed)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, just noticed that. going to take this out.

@jreback jreback merged commit 075eca1 into pandas-dev:master Apr 27, 2017
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
* DEPR: allow options for using bottleneck/numexpr

deprecate pd.computation.expressions.set_use_numexpr()

* DEPR: pandas.types.concat.union_categoricals in favor of pandas.api.type.union_categoricals

closes pandas-dev#16140
gfyoung added a commit to forking-repos/pandas that referenced this pull request Oct 27, 2018
Removes the following:

* pandas.types
* pandas.computation
* pandas.util.decorators

xref pandas-devgh-16157.
xref pandas-devgh-16250.
gfyoung added a commit to forking-repos/pandas that referenced this pull request Oct 28, 2018
Removes the following:

* pandas.types
* pandas.computation
* pandas.util.decorators

xref pandas-devgh-16157.
xref pandas-devgh-16250.
jreback pushed a commit that referenced this pull request Oct 28, 2018
Removes the following:

* pandas.types
* pandas.computation
* pandas.util.decorators

xref gh-16157.
xref gh-16250.
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
Removes the following:

* pandas.types
* pandas.computation
* pandas.util.decorators

xref pandas-devgh-16157.
xref pandas-devgh-16250.
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Removes the following:

* pandas.types
* pandas.computation
* pandas.util.decorators

xref pandas-devgh-16157.
xref pandas-devgh-16250.
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Removes the following:

* pandas.types
* pandas.computation
* pandas.util.decorators

xref pandas-devgh-16157.
xref pandas-devgh-16250.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants