Skip to content

Commit c287845

Browse files
committed
conflict PR pandas-dev#14856 resolved
2 parents 40eddc3 + f1cfe5b commit c287845

File tree

156 files changed

+12825
-15355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+12825
-15355
lines changed

.travis.yml

+59-58
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
global:
1717

1818
# pandas-docs-travis GH
19-
- secure: "UJK7kUtkcnV9PFP4IBXAvgmRQKdwARlfqF4UZQ5tBwrpnD1a3n7FLBijcuXQ3jkvwpEc/FZB9RJDXmsqYXJPvq3BC++2Cv2tFDvKr/c+y8KffszAyVk47jKEHMNmGgauwaNMggsE/rH8YHe4so9LsJHTRbzmLo8lXPNTldoIu5s="
19+
- secure: "YvvTc+FrSYHgdxqoxn9s8VOaCWjvZzlkaf6k55kkmQqCYR9dPiLMsot1F96/N7o3YlD1s0znPQCak93Du8HHi/8809zAXloTaMSZrWz4R4qn96xlZFRE88O/w/Z1t3VVYpKX3MHlCggBc8MtXrqmvWKJMAqXyysZ4TTzoiJDPvE="
2020

2121
git:
2222
# for cloning
@@ -66,19 +66,6 @@ matrix:
6666
apt:
6767
packages:
6868
- python-gtk2
69-
- python: 3.4
70-
env:
71-
- PYTHON_VERSION=3.4
72-
- JOB_NAME: "34_nslow"
73-
- NOSE_ARGS="not slow and not disabled"
74-
- FULL_DEPS=true
75-
- CLIPBOARD=xsel
76-
- CACHE_NAME="34_nslow"
77-
- USE_CACHE=true
78-
addons:
79-
apt:
80-
packages:
81-
- xsel
8269
- python: 3.5
8370
env:
8471
- PYTHON_VERSION=3.5
@@ -93,6 +80,33 @@ matrix:
9380
apt:
9481
packages:
9582
- xsel
83+
- python: 3.6-dev
84+
env:
85+
- PYTHON_VERSION=3.6
86+
- JOB_NAME: "36_dev"
87+
- JOB_TAG=_DEV
88+
- NOSE_ARGS="not slow and not network and not disabled"
89+
- PANDAS_TESTING_MODE="deprecate"
90+
addons:
91+
apt:
92+
packages:
93+
- libatlas-base-dev
94+
- gfortran
95+
# In allow_failures
96+
- python: 2.7
97+
env:
98+
- PYTHON_VERSION=2.7
99+
- JOB_NAME: "27_nslow_nnet_COMPAT"
100+
- NOSE_ARGS="not slow and not network and not disabled"
101+
- LOCALE_OVERRIDE="it_IT.UTF-8"
102+
- INSTALL_TEST=true
103+
- JOB_TAG=_COMPAT
104+
- CACHE_NAME="27_nslow_nnet_COMPAT"
105+
- USE_CACHE=true
106+
addons:
107+
apt:
108+
packages:
109+
- language-pack-it
96110
# In allow_failures
97111
- python: 2.7
98112
env:
@@ -103,45 +117,46 @@ matrix:
103117
- FULL_DEPS=true
104118
- CACHE_NAME="27_slow"
105119
- USE_CACHE=true
120+
# In allow_failures
121+
- python: 2.7
122+
env:
123+
- PYTHON_VERSION=2.7
124+
- JOB_NAME: "27_build_test_conda"
125+
- JOB_TAG=_BUILD_TEST
126+
- NOSE_ARGS="not slow and not disabled"
127+
- FULL_DEPS=true
128+
- BUILD_TEST=true
129+
- CACHE_NAME="27_build_test_conda"
130+
- USE_CACHE=true
106131
# In allow_failures
107132
- python: 3.4
108133
env:
109134
- PYTHON_VERSION=3.4
110-
- JOB_NAME: "34_slow"
111-
- JOB_TAG=_SLOW
112-
- NOSE_ARGS="slow and not network and not disabled"
135+
- JOB_NAME: "34_nslow"
136+
- NOSE_ARGS="not slow and not disabled"
113137
- FULL_DEPS=true
114138
- CLIPBOARD=xsel
115-
- CACHE_NAME="34_slow"
139+
- CACHE_NAME="34_nslow"
116140
- USE_CACHE=true
117141
addons:
118142
apt:
119143
packages:
120144
- xsel
121145
# In allow_failures
122-
- python: 2.7
146+
- python: 3.4
123147
env:
124-
- PYTHON_VERSION=2.7
125-
- JOB_NAME: "27_build_test_conda"
126-
- JOB_TAG=_BUILD_TEST
127-
- NOSE_ARGS="not slow and not disabled"
148+
- PYTHON_VERSION=3.4
149+
- JOB_NAME: "34_slow"
150+
- JOB_TAG=_SLOW
151+
- NOSE_ARGS="slow and not network and not disabled"
128152
- FULL_DEPS=true
129-
- BUILD_TEST=true
130-
- CACHE_NAME="27_build_test_conda"
153+
- CLIPBOARD=xsel
154+
- CACHE_NAME="34_slow"
131155
- USE_CACHE=true
132-
# In allow_failures
133-
- python: 3.6-dev
134-
env:
135-
- PYTHON_VERSION=3.6
136-
- JOB_NAME: "36_dev"
137-
- JOB_TAG=_DEV
138-
- NOSE_ARGS="not slow and not network and not disabled"
139-
- PANDAS_TESTING_MODE="deprecate"
140156
addons:
141157
apt:
142158
packages:
143-
- libatlas-base-dev
144-
- gfortran
159+
- xsel
145160
# In allow_failures
146161
- python: 3.5
147162
env:
@@ -157,21 +172,6 @@ matrix:
157172
packages:
158173
- libatlas-base-dev
159174
- gfortran
160-
# In allow_failures
161-
- python: 2.7
162-
env:
163-
- PYTHON_VERSION=2.7
164-
- JOB_NAME: "27_nslow_nnet_COMPAT"
165-
- NOSE_ARGS="not slow and not network and not disabled"
166-
- LOCALE_OVERRIDE="it_IT.UTF-8"
167-
- INSTALL_TEST=true
168-
- JOB_TAG=_COMPAT
169-
- CACHE_NAME="27_nslow_nnet_COMPAT"
170-
- USE_CACHE=true
171-
addons:
172-
apt:
173-
packages:
174-
- language-pack-it
175175
# In allow_failures
176176
- python: 3.5
177177
env:
@@ -226,18 +226,19 @@ matrix:
226226
- BUILD_TEST=true
227227
- CACHE_NAME="27_build_test_conda"
228228
- USE_CACHE=true
229-
- python: 3.6-dev
229+
- python: 3.4
230230
env:
231-
- PYTHON_VERSION=3.6
232-
- JOB_NAME: "36_dev"
233-
- JOB_TAG=_DEV
234-
- NOSE_ARGS="not slow and not network and not disabled"
235-
- PANDAS_TESTING_MODE="deprecate"
231+
- PYTHON_VERSION=3.4
232+
- JOB_NAME: "34_nslow"
233+
- NOSE_ARGS="not slow and not disabled"
234+
- FULL_DEPS=true
235+
- CLIPBOARD=xsel
236+
- CACHE_NAME="34_nslow"
237+
- USE_CACHE=true
236238
addons:
237239
apt:
238240
packages:
239-
- libatlas-base-dev
240-
- gfortran
241+
- xsel
241242
- python: 3.5
242243
env:
243244
- PYTHON_VERSION=3.5

asv_bench/benchmarks/algorithms.py

+33-8
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
from pandas.util import testing as tm
44

55

6-
class algorithm(object):
6+
class Algorithms(object):
77
goal_time = 0.2
88

99
def setup(self):
1010
N = 100000
11+
np.random.seed(1234)
1112

1213
self.int_unique = pd.Int64Index(np.arange(N * 5))
1314
# cache is_unique
@@ -17,28 +18,42 @@ def setup(self):
1718
self.float = pd.Float64Index(np.random.randn(N).repeat(5))
1819

1920
# Convenience naming.
20-
self.checked_add = pd.core.nanops._checked_add_with_arr
21+
self.checked_add = pd.core.algorithms.checked_add_with_arr
2122

2223
self.arr = np.arange(1000000)
2324
self.arrpos = np.arange(1000000)
2425
self.arrneg = np.arange(-1000000, 0)
2526
self.arrmixed = np.array([1, -1]).repeat(500000)
27+
self.strings = tm.makeStringIndex(100000)
2628

27-
def time_int_factorize(self):
29+
self.arr_nan = np.random.choice([True, False], size=1000000)
30+
self.arrmixed_nan = np.random.choice([True, False], size=1000000)
31+
32+
# match
33+
self.uniques = tm.makeStringIndex(1000).values
34+
self.all = self.uniques.repeat(10)
35+
36+
def time_factorize_string(self):
37+
self.strings.factorize()
38+
39+
def time_factorize_int(self):
2840
self.int.factorize()
2941

30-
def time_float_factorize(self):
42+
def time_factorize_float(self):
3143
self.int.factorize()
3244

33-
def time_int_unique_duplicated(self):
45+
def time_duplicated_int_unique(self):
3446
self.int_unique.duplicated()
3547

36-
def time_int_duplicated(self):
48+
def time_duplicated_int(self):
3749
self.int.duplicated()
3850

39-
def time_float_duplicated(self):
51+
def time_duplicated_float(self):
4052
self.float.duplicated()
4153

54+
def time_match_strings(self):
55+
pd.match(self.all, self.uniques)
56+
4257
def time_add_overflow_pos_scalar(self):
4358
self.checked_add(self.arr, 1)
4459

@@ -57,8 +72,18 @@ def time_add_overflow_neg_arr(self):
5772
def time_add_overflow_mixed_arr(self):
5873
self.checked_add(self.arr, self.arrmixed)
5974

75+
def time_add_overflow_first_arg_nan(self):
76+
self.checked_add(self.arr, self.arrmixed, arr_mask=self.arr_nan)
77+
78+
def time_add_overflow_second_arg_nan(self):
79+
self.checked_add(self.arr, self.arrmixed, b_mask=self.arrmixed_nan)
80+
81+
def time_add_overflow_both_arg_nan(self):
82+
self.checked_add(self.arr, self.arrmixed, arr_mask=self.arr_nan,
83+
b_mask=self.arrmixed_nan)
84+
6085

61-
class hashing(object):
86+
class Hashing(object):
6287
goal_time = 0.2
6388

6489
def setup(self):

asv_bench/benchmarks/attrs_caching.py

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
from .pandas_vb_common import *
2+
from pandas.util.decorators import cache_readonly
23

34

4-
class getattr_dataframe_index(object):
5+
class DataFrameAttributes(object):
56
goal_time = 0.2
67

78
def setup(self):
89
self.df = DataFrame(np.random.randn(10, 6))
910
self.cur_index = self.df.index
1011

11-
def time_getattr_dataframe_index(self):
12+
def time_get_index(self):
1213
self.foo = self.df.index
1314

15+
def time_set_index(self):
16+
self.df.index = self.cur_index
17+
1418

15-
class setattr_dataframe_index(object):
19+
class CacheReadonly(object):
1620
goal_time = 0.2
1721

1822
def setup(self):
19-
self.df = DataFrame(np.random.randn(10, 6))
20-
self.cur_index = self.df.index
2123

22-
def time_setattr_dataframe_index(self):
23-
self.df.index = self.cur_index
24+
class Foo:
25+
26+
@cache_readonly
27+
def prop(self):
28+
return 5
29+
self.obj = Foo()
30+
31+
def time_cache_readonly(self):
32+
self.obj.prop

0 commit comments

Comments
 (0)