Python | sympy.Integer() method
With the help of sympy.Integer() method, we can convert the floating point to integer values and this method very efficient in term of memory if we want to save integer value.
Syntax :
sympy.Integer()
Return : Return integer value.
Example #1 :
In this example we can see that by using sympy.Integer() method, we are able to convert the floating values to integer or optimize memory consumption.
# import sympy from sympy import * # Use sympy.Integer() method gfg = Integer(50) + Integer(50) print(gfg) |
Output :
100
Example #2 :
# import sympy from sympy import * # Use sympy.Integer() method gfg = Integer(12.36) + Integer(8.98) print(gfg) |
Output :
20
Recommended Posts:
- class method vs static method in Python
- Python | os.dup() method
- Python | set() method
- Python | next() method
- Python | sympy.Add() method
- Python | sympy.nT() method
- Python | os.fchown() method
- Python PIL | ImagePalette() Method
- Python | isinstance() method
- Python | PyTorch sin() method
- Python | shutil.which() method
- Python | range() method
- Python | os.chown() method
- Python PIL | composite() method
- Python PIL | copy() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



