This is the first post.
I will write what role the numpy function plays in order to be able to cover numpy, which is the library most likely to be used in the numerical calculation system in python. There is a list of numpy functions at this link, but there are quite a few.
https://oku.edu.mie-u.ac.jp/~okumura/python/basicstats.html
For the time being, start with lowercase letters and enter them in order. First from a Those with? Can't figure out how to use
np.abs absolute value np.absolute Absolute value. Same as abs np.absolute_import ? np.add addition np.add_docstring Add characters to numpy? Not like (obj, string) np.add_newdoc ? np.add_newdoc_ufunc ? np.alen Same as using len () normally np.all Check if all meet the conditions in (). When comparing with == If possible, compare after being broadcast. https://note.nkmk.me/python-numpy-condition/ Returns whether the two arrays in np.allclose () are an exact match https://algorithm.joho.info/programming/python/numpy-allclose/ np.alltrue Are all arrays in () true? np.amax Returns the maximum value np.amin returns the minimum value np.angle Give a complex number value in () to get the angle from the real part and the imaginary part Check if any of the conditions in np.any () are met. Related to all np.append Append values and arrays at the end or beginning https://note.nkmk.me/python-numpy-append/ np.apply_along_axis Perform function calculations determined along the axis in a two-dimensional array (my_func, 0, b) Since b is a two-dimensional array and 0, define a function in the vertical direction and my_func. https://qiita.com/Moby-Dick/items/f7603456260a80fd5ee3 np.apply_over_axes This also applies the function along the axis. In a different way from along_axis https://numpy.org/doc/stable/reference/generated/numpy.apply_over_axes.html np.arange Make serial numbers np.arccos Arc cosine From here arc * is the inverse function of trigonometric function np.arccosh Arc hyperbolic cosine np.arcsin arc sign np.arcsinh arc cosine np.arctan Arctangent np.arctan2 Arctangent, but more negative than arctan http://nomoreretake.net/2013/10/21/arctan2/ np.arctanh Arc Hyperbolic Tangent np.argmax Position with maximum value (index) np.argmin Position with minimum value (index) np.argpartition Takes some top indexes. Take partly from argsort https://biomedicalhacks.com/2020-03-20/numpy-pandas-10-tips/ np.argsort Put the rank in the value. Used when you want to sort by a specific column in 2D https://note.nkmk.me/python-numpy-sort-argsort/ np.argwhere () Returns an array that satisfies the condition https://rennnosukesann.hatenablog.com/entry/2018/06/29/000000 np.around rounding Convert np.array list to numpy. There are many np.as * array functions in np.array that change their defaults. The default for np.array is copy = True, order = “K”, subok = False np.array2string Convert array to a string Check if a and b are exactly the same with np.array_equal (a, b). If the shape is different, False is always returned. Check if a and b are exactly the same with np.array_equiv (a, b). Unlike array_equal, compare after being broadcast if possible. Same as np.all (a == b). np.array_repr Make array a string. Similar to array2string but prefixed with array np.array_split Divide the array equally. Unlike split, it adjusts even if it is not even. https://note.nkmk.me/python-numpy-split/ np.array_str Convert to string Is it the same as array2string? np.asanyarray ? np.asarray copy = False in np.array. The difference from np.array is that it connects to the same memory instead of copying. np.asarray_chkfinite Basically the same as np.array, but an error occurs if there is inf or nan np.ascontiguousarray np.array is the same type as copy = False, order = “C” np.asarray, but the order of memory storage is different. Affects the number of bytes used and calculation speed. C is C language np.asfarray Character string Put the list entered as a number into the array as a number http://arduinopid.web.fc2.com/Q5-10.html np.asfortranarray np.array is the same type as copy = False, order = “F” np.asarray, but the order of memory storage is different. Affects the number of bytes used and calculation speed. F is a Fortran permutation https://ja.coder.work/so/python/759098 Put the array as np.asmatrix matrix. Easy to handle matrix operations https://numpy.org/doc/stable/reference/generated/numpy.asmatrix.html np.asscalar Scalar an array with one element number https://qiita.com/shiro-kuma/items/5aa2b4402d50b8791b8b np.atleast_1d Adjust the number of dimensions of ndarray to at least 1. np.atleast_2d Adjust the number of dimensions of ndarray to at least 2. https://minus9d.hatenablog.com/entry/2017/05/31/215512 np.atleast_3d Adjust the number of dimensions of ndarray to at least 3 np.average Calculate the average. Axis can be specified https://qiita.com/HidKamiya/items/cdc7a6ccdc076031f753
If you notice any points such as lack of explanation or mistakes, it would be helpful if you could write them in the comments. In that case, it will be reflected as appropriate.
Recommended Posts