You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few semantic changes have occurred over the years for both the libraries however, the brief tutorials on the website are outdated. One such example is:
fromnumpyimport*a=array([1,2,3,4,5,6])
print(a)
The above code semantics is outdated and should be the following instead:
importnumpyasnpa=np.array([1,2,3,4,5,6])
print(a)
The outdated code might not be just limited to the aforementioned libraries. These were the only tutorials I happened to check.
I understand that this code works but it's just good practice to import numpy as np instead of from numpy import * and so on.
The text was updated successfully, but these errors were encountered:
A few semantic changes have occurred over the years for both the libraries however, the brief tutorials on the website are outdated. One such example is:
The above code semantics is outdated and should be the following instead:
The outdated code might not be just limited to the aforementioned libraries. These were the only tutorials I happened to check.
I understand that this code works but it's just good practice to
import numpy as np
instead offrom numpy import *
and so on.The text was updated successfully, but these errors were encountered: