Skip to content

Conversation

faze-geek
Copy link
Contributor

References to other Issues or PRs

Closes #16510

Brief description of what is fixed or changed

The issue #16510 has already been resolved on master by some other commit .
This fix is for 16510( comment )

Earlier on master -

>>> from sympy.vector import CoordSys3D
>>> C = CoordSys3D('C')
>>> v = 3*C.i + 4*C.j + 5*C.k
>>> v.is_scalar
True

On my branch -

>>> from sympy.vector import CoordSys3D
>>> C = CoordSys3D('C')
>>> v = 3*C.i + 4*C.j + 5*C.k
>>> v.is_scalar
False

Other comments

Release Notes

  • vector
    • Scalar condition of vectors made False

@sympy-bot
Copy link

sympy-bot commented Feb 7, 2022

Hi, I am the SymPy bot (v162). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.11.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->
Closes #16510

#### Brief description of what is fixed or changed
The issue #16510 has already been resolved on master by some other commit .
This fix is for [16510( comment )
](https://github.com/sympy/sympy/issues/16510#issuecomment-592611393)

Earlier on master -
```
>>> from sympy.vector import CoordSys3D
>>> C = CoordSys3D('C')
>>> v = 3*C.i + 4*C.j + 5*C.k
>>> v.is_scalar
True
```
On my branch -
```
>>> from sympy.vector import CoordSys3D
>>> C = CoordSys3D('C')
>>> v = 3*C.i + 4*C.j + 5*C.k
>>> v.is_scalar
False
```



#### Other comments


#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* vector
  * Scalar condition of vectors made False
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

This reverts commit bae1e19.
@github-actions
Copy link

github-actions bot commented Feb 7, 2022

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [907895ac]       [706ab904]
-         219±2ms        132±0.9ms     0.60  large_exprs.TimeLargeExpressionOperations.time_subs
-     14.6±0.02ms      9.66±0.02ms     0.66  matrices.TimeMatrixExpression.time_MatAdd_doit
-       222±0.5μs        103±0.2μs     0.46  matrices.TimeMatrixExpression.time_MatMul
-     14.1±0.01ms      7.28±0.04ms     0.51  matrices.TimeMatrixExpression.time_MatMul_doit
-         4.13±0s          304±2ms     0.07  polygon.PolygonArbitraryPoint.time_bench01
+     3.33±0.01ms      5.52±0.02ms     1.66  solve.TimeMatrixOperations.time_det(4, 2)
+     3.31±0.01ms      5.50±0.02ms     1.66  solve.TimeMatrixOperations.time_det_bareiss(4, 2)
+      36.8±0.1ms       66.0±0.3ms     1.79  solve.TimeMatrixSolvePyDySlow.time_linsolve(1)
+      37.8±0.5ms       65.5±0.4ms     1.73  solve.TimeMatrixSolvePyDySlow.time_solve(1)

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@faze-geek
Copy link
Contributor Author

Ping @smichr @oscarbenjamin for review.

@anutosh491
Copy link
Member

Nice catch ,looks good . Could go in after set of reviews !

@faze-geek
Copy link
Contributor Author

faze-geek commented Feb 8, 2022

Nice catch ,looks good . Could go in after set of reviews !

Thanks ,seems straight forward to me . @oscarbenjamin @czgdp1807

@czgdp1807
Copy link
Member

I don't know much about this part of SymPy. Can't say much whether this is the right change or not. @sylee957 Any thoughts from your side?

@faze-geek
Copy link
Contributor Author

I don't know much about this part of SymPy. Can't say much whether this is the right change or not. @sylee957 Any thoughts from your side?

Thanks . @oscarbenjamin @sylee957 would appreciate any suggestions / response to this !

@sylee957
Copy link
Member

Is there any nontrivial issues that this can solve or is it only solves is_scalar?

@faze-geek
Copy link
Contributor Author

Is there any nontrivial issues that this can solve or is it only solves is_scalar?

None that I came across of as of now .Seemed direct when I read your comment on the issue !

@sylee957 sylee957 merged commit 7cb6a0d into sympy:master Feb 10, 2022
@faze-geek faze-geek deleted the Fix_16510 branch February 11, 2022 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

is_scalar is true for matrix symbols and expressions?
5 participants