Commit 59d5e9d
DEP: remove
* Refactor Expr arithmetic methods to simplify logic
float(Expr) can't return True
* Refactor performance tests to use timeit and update assertions
Replaces manual timing with the timeit module for more accurate performance measurement in matrix operation tests. Updates assertions to require the optimized implementation to be at least 25% faster, and reduces test parameterization to n=100 for consistency.
* use a fixed value for constant
Replaces random matrix generation with a stacked matrix of zeros and ones in test_matrix_dot_performance to provide more controlled test data.
---------
Co-authored-by: João Dionísio <57299939+Joao-Dionisio@users.noreply.github.com>_is_number(Expr) from expr.pyi file (#1168)1 parent bc24757 commit 59d5e9d
2 files changed
+25
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 211 | | |
216 | 212 | | |
217 | 213 | | |
| |||
254 | 250 | | |
255 | 251 | | |
256 | 252 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | 253 | | |
261 | 254 | | |
262 | 255 | | |
| |||
278 | 271 | | |
279 | 272 | | |
280 | 273 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 274 | + | |
286 | 275 | | |
287 | 276 | | |
288 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
260 | | - | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 266 | + | |
270 | 267 | | |
271 | | - | |
272 | | - | |
273 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
274 | 271 | | |
275 | | - | |
| 272 | + | |
276 | 273 | | |
277 | 274 | | |
278 | | - | |
| 275 | + | |
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
282 | 279 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 280 | + | |
288 | 281 | | |
289 | | - | |
290 | | - | |
291 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
292 | 285 | | |
293 | | - | |
| 286 | + | |
294 | 287 | | |
295 | 288 | | |
296 | | - | |
| 289 | + | |
297 | 290 | | |
298 | 291 | | |
299 | 292 | | |
300 | 293 | | |
| 294 | + | |
301 | 295 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 296 | + | |
306 | 297 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 298 | + | |
310 | 299 | | |
311 | | - | |
| 300 | + | |
312 | 301 | | |
313 | 302 | | |
314 | 303 | | |
| |||
319 | 308 | | |
320 | 309 | | |
321 | 310 | | |
322 | | - | |
| 311 | + | |
323 | 312 | | |
324 | 313 | | |
325 | 314 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 315 | + | |
331 | 316 | | |
332 | | - | |
333 | | - | |
334 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
335 | 320 | | |
336 | | - | |
| 321 | + | |
337 | 322 | | |
338 | 323 | | |
339 | 324 | | |
| |||
0 commit comments