numpy.ndarray.__imul__() method we can multiply a specific value provided as a parameter in
ndarray .__ imul __ () ... The value will be multiplied by each element in the array.
Synatx: ndarray .__ imul __ ($ self, value, /)
Return: self * = value
Example # 1:
In this example, we see that each the array element is multiplied by the value specified as a parameter in the
ndarray .__ imul __ () method. Remember that this method will work for every type of numeric value.
[6. 13. 15. 22.5 25 .]
Example # 2:
[[3. 6.6 9. 12. 15.03] [18.3 15. 14.4 9. 6.]]
Pandas 1.x Cookbook: Practical recipes for scientific computing, time series analysis, and exploratory data analysis using Python, 2nd Edition....
As the title promises, this book will introduce you to one of the world’s most popular programming languages: Python. It’s aimed at beginning programmers as well as more experienced programmers wh...
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems PDF, 2nd Edition. This book assumes you know next to nothing about m...
Become a master in Python by learning coding best practices and advanced programming concepts in Python 3.7. This book is written for Python developers who wish to go further in mastering Python. A...