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
Add missing type(...) in _trigsimp_inverse #26541
base: master
Are you sure you want to change the base?
Conversation
✅ Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes.
Click here to see the pull request description that was parsed.
|
Do you know of an example that would trigger the error? |
from sympy import cos, trigsimp
trigsimp(cos('x')**2, inverse=True) |
Can you add a test case for the case that fails without this fix? |
The actual problem is that |
2a7a806
to
6582c59
Compare
I think the failed job is unrelated (gh-20456) so I restarted the tests. |
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) | Change | Before [2487dbb5] | After [95085aaa] | Ratio | Benchmark (Parameter) |
|----------|----------------------|---------------------|---------|----------------------------------------------------------------------|
| - | 69.9±0.8ms | 44.0±0.3ms | 0.63 | integrate.TimeIntegrationRisch02.time_doit(10) |
| - | 68.3±1ms | 43.3±0.7ms | 0.63 | integrate.TimeIntegrationRisch02.time_doit_risch(10) |
| + | 18.5±0.2μs | 29.5±0.2μs | 1.6 | integrate.TimeIntegrationRisch03.time_doit(1) |
| - | 5.40±0.05ms | 2.83±0.01ms | 0.52 | logic.LogicSuite.time_load_file |
| - | 72.6±0.4ms | 28.5±0.4ms | 0.39 | polys.TimeGCD_GaussInt.time_op(1, 'dense') |
| - | 25.8±0.1ms | 16.9±0.03ms | 0.65 | polys.TimeGCD_GaussInt.time_op(1, 'expr') |
| - | 73.6±0.5ms | 29.0±0.2ms | 0.39 | polys.TimeGCD_GaussInt.time_op(1, 'sparse') |
| - | 256±2ms | 124±0.7ms | 0.49 | polys.TimeGCD_GaussInt.time_op(2, 'dense') |
| - | 253±0.9ms | 126±0.6ms | 0.5 | polys.TimeGCD_GaussInt.time_op(2, 'sparse') |
| - | 658±5ms | 371±1ms | 0.56 | polys.TimeGCD_GaussInt.time_op(3, 'dense') |
| - | 660±2ms | 374±1ms | 0.57 | polys.TimeGCD_GaussInt.time_op(3, 'sparse') |
| - | 503±2μs | 289±0.7μs | 0.58 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(1, 'dense') |
| - | 1.79±0.01ms | 1.03±0.01ms | 0.58 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(2, 'dense') |
| - | 5.79±0.02ms | 3.10±0.01ms | 0.54 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(3, 'dense') |
| - | 453±0.5μs | 229±0.7μs | 0.51 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(1, 'dense') |
| - | 1.50±0.01ms | 693±5μs | 0.46 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(2, 'dense') |
| - | 4.90±0.05ms | 1.64±0.01ms | 0.33 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(3, 'dense') |
| - | 374±2μs | 204±1μs | 0.55 | polys.TimeGCD_SparseGCDHighDegree.time_op(1, 'dense') |
| - | 2.46±0.01ms | 1.21±0ms | 0.49 | polys.TimeGCD_SparseGCDHighDegree.time_op(3, 'dense') |
| - | 9.95±0.04ms | 4.33±0.03ms | 0.44 | polys.TimeGCD_SparseGCDHighDegree.time_op(5, 'dense') |
| - | 364±3μs | 169±1μs | 0.46 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(1, 'dense') |
| - | 2.53±0.01ms | 894±5μs | 0.35 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(3, 'dense') |
| - | 9.61±0.07ms | 2.66±0.03ms | 0.28 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(5, 'dense') |
| - | 1.06±0.01ms | 429±2μs | 0.4 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'dense') |
| - | 1.72±0.01ms | 507±2μs | 0.29 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| - | 5.94±0.04ms | 1.79±0.02ms | 0.3 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'dense') |
| - | 8.42±0.1ms | 1.53±0ms | 0.18 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'sparse') |
| - | 284±2μs | 65.4±0.5μs | 0.23 | polys.TimePREM_QuadraticNonMonicGCD.time_op(1, 'sparse') |
| - | 3.48±0.03ms | 399±3μs | 0.11 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'dense') |
| - | 3.99±0.07ms | 283±2μs | 0.07 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'sparse') |
| - | 6.95±0.1ms | 1.26±0.01ms | 0.18 | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'dense') |
| - | 8.72±0.03ms | 844±3μs | 0.1 | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'sparse') |
| - | 5.32±0.1ms | 2.98±0.01ms | 0.56 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(2, 'sparse') |
| - | 12.1±0.04ms | 6.57±0.06ms | 0.54 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'dense') |
| - | 22.3±0.04ms | 9.09±0.02ms | 0.41 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| - | 5.18±0.02ms | 868±2μs | 0.17 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(1, 'sparse') |
| - | 12.5±0.06ms | 7.10±0.02ms | 0.57 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(2, 'sparse') |
| - | 102±0.4ms | 25.9±0.1ms | 0.25 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'dense') |
| - | 166±1ms | 53.7±0.2ms | 0.32 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'sparse') |
| - | 176±3μs | 113±0.6μs | 0.64 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(1, 'dense') |
| - | 356±3μs | 216±1μs | 0.61 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(1, 'sparse') |
| - | 4.33±0.06ms | 843±4μs | 0.19 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'dense') |
| - | 5.27±0.02ms | 388±2μs | 0.07 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'sparse') |
| - | 20.1±0.3ms | 2.81±0.01ms | 0.14 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'dense') |
| - | 23.0±0.2ms | 630±2μs | 0.03 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'sparse') |
| - | 482±2μs | 136±1μs | 0.28 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(1, 'sparse') |
| - | 4.72±0.06ms | 611±2μs | 0.13 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'dense') |
| - | 5.30±0.03ms | 141±3μs | 0.03 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'sparse') |
| - | 13.3±0.3ms | 1.30±0.02ms | 0.1 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'dense') |
| - | 14.1±0.2ms | 145±2μs | 0.01 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'sparse') |
| - | 136±0.6μs | 74.5±0.8μs | 0.55 | solve.TimeMatrixOperations.time_rref(3, 0) |
| - | 256±0.9μs | 89.2±1μs | 0.35 | solve.TimeMatrixOperations.time_rref(4, 0) |
| - | 24.0±0.09ms | 9.98±0.2ms | 0.42 | solve.TimeSolveLinSys189x49.time_solve_lin_sys |
| - | 28.3±0.1ms | 15.4±0.08ms | 0.54 | solve.TimeSparseSystem.time_linsolve_Aaug(20) |
| - | 55.3±0.4ms | 24.8±0.1ms | 0.45 | solve.TimeSparseSystem.time_linsolve_Aaug(30) |
| - | 28.3±0.1ms | 15.0±0.2ms | 0.53 | solve.TimeSparseSystem.time_linsolve_Ab(20) |
| - | 55.1±0.4ms | 24.5±0.1ms | 0.44 | solve.TimeSparseSystem.time_linsolve_Ab(30) |
Full benchmark results can be found as artifacts in GitHub Actions |
When does that happen? Maybe that should be fixed rather than trying to handle it here. |
Brief description of what is fixed or changed
Changed
isinstance(rv.args[0], g())
toisinstance(rv.args[0], type(g()))
as
g()
does not return a type and this line would therefore raise a TypeError.Release Notes
NO ENTRY