NumPy: Print the NumPy version in your system

NumPy: Array Object Exercise-1 with Solution

Write a NumPy program to print the NumPy version in your system.

Sample Solution:-

Python Code:

import numpy as np

Sample Output:


NumPy version:

class numpy.lib.NumpyVersion(vstring): Parse and compare numpy version strings.

New in version 1.9.0.
Parameters vstring : str
NumPy version string (np.__version__).

Python Code Editor:

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: NumPy Array Object Exercises Home.
Next: Write a NumPy program to convert a list of numeric value into a one-dimensional NumPy array.

What is the difficulty level of this exercise?

Test your Python skills with w3resource's quiz

Python: Tips of the Day

Set comprehension:

>>> m = {x ** 2 for x in range(5)}
>>> m
{0, 1, 4, 9, 16}