We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a1a23b commit f6cb2a9Copy full SHA for f6cb2a9
benchmarks/benchmarks/bench_shape_base.py
@@ -152,3 +152,19 @@ def time_scalar_kron(self):
152
153
def time_mat_kron(self):
154
np.kron(self.large_mat, self.large_mat)
155
+
156
+class AtLeast1D(Benchmark):
157
+ """Benchmarks for np.atleast_1d"""
158
159
+ def setup(self):
160
+ self.x = np.array([1, 2, 3])
161
+ self.zero_d = np.float64(1.)
162
163
+ def time_atleast_1d(self):
164
+ np.atleast_1d(self.x, self.x, self.x)
165
166
+ def time_atleast_1d_reshape(self):
167
+ np.atleast_1d(self.zero_d, self.zero_d, self.zero_d)
168
169
+ def time_atleast_1d_single_argument(self):
170
+ np.atleast_1d(self.x)
0 commit comments