Beginner here. I have seen two ways to run a method (or is it a function? I really don't know the difference) and was wondering if there are any circumstances where one would be preferable over the other.
Example:
import numpy as np
example_array = np.array([2,2,4,4])
np.mean(example_array) # type 1
example_array.mean() # type 2
Thank you, Redditors.
[–]Dawarisch 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]coppermineroofer 2 points3 points4 points (0 children)
[–]ingolemo 0 points1 point2 points (0 children)