1차원 배열 추가 및 삭제

 

 

 1차원 배열 추가

 

'''
1차원 배열 추가
1) np.append(arr, 값, axis=0)
==> 값 추가해서 새로운 벡터 반환
==> axis=0이 기본이고 행축을 고정한다는 의미이다.
따라서 열이 추가됨
2) np.insert(arr, 위치(idx|fancy), 값, axis=0)
'''
import numpy as np
list_value= [10,20,30,40,50]
arr = np.array(list_value)
print(arr)
# 1) np.append(arr, 값, axis=0)
arr2 = np.append(arr, 100)
print(arr2) # [ 10 20 30 40 50 100]
print("원보:", arr) # [10 20 30 40 50]
arr2 = np.append(arr, [100,300])
print(arr2) # [ 10 20 30 40 50 100 300]
# 2) np.insert
list_value= [10,20,30,40,50]
arr = np.array(list_value)
arr2 = np.insert(arr,0, 100) # 색인: 인덱싱
print(arr2) # [100 10 20 30 40 50]
arr2 = np.insert(arr,[0,2], 100) # 색인: fancy 색인(정수형 색인)
print(arr2) # [100 10 20 100 30 40 50]
arr2 = np.insert(arr,[0,2,1], 100) # 색인: fancy 색인(정수형 색인)
print(arr2) # [100 10 100 20 100 30 40 50]

* 출력 화면

 1차원 배열 삭제

 

'''
1차원 배열 삭제
1) np.delete(arr, 위치(idx|fancy|np.s_[s:e]), axis )
'''
import numpy as np
list_value= [10,20,30,40,50]
arr = np.array(list_value)
print(arr)
arr2 = np.delete(arr, 0) # 색인: 인덱싱
print(arr2) # [20 30 40 50]
arr2 = np.delete(arr, -1) # 색인: 인덱싱
print(arr2) # [20 30 40 50]
arr2 = np.delete(arr, [0,2,3]) # 색인: fancy 색인(정수형 색인)
print(arr2) # [20 50]
arr2 = np.delete(arr, [0,2,-1]) # 색인: fancy 색인(정수형 색인)
print(arr2) # [20 40]
# 슬라이싱 삭제
list_value= [10,20,30,40,50]
arr = np.array(list_value)
arr2 = np.delete(arr, np.s_[1:4]) # 색인: 슬라이싱 ==> np.s_[s:e]
print(arr2) # [20 30 40 50]

* 출력 화면

 

 출처

 

 

+ 강의 교재

'AI Bootcamp > Numpy' 카테고리의 다른 글

[Numpy] 1일차_1차원 배열 생성  (0) 2022.04.19
[Numpy] 1일차_0차열 배열  (0) 2022.04.19

1차원 배열 생성

 

 

 1차원 배열 생성_Vector1_array 함수

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
'''
import numpy as np
# 1. 벡터 생성
list_value= [10,20,30]
vector_value = np.array(list_value)
print("list_value:", list_value, type(list_value)) # [10, 20, 30] <class 'list'>
print("vector_value:", vector_value, type(vector_value)) # [10 20 30] <class 'numpy.ndarray'>

* 출력 화면

 

 1차원 배열 생성_Vector2_array 함수2_list와 vector 차이점

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
'''
import numpy as np
# 1. 벡터 생성
list_value= [10,20,30]
vector_value = np.array(list_value)
print("list_value:", list_value, type(list_value)) # [10, 20, 30] <class 'list'>
print("vector_value:", vector_value, type(vector_value)) # [10 20 30] <class 'numpy.ndarray'>
# 2. 파이썬의 리스트 vs 벡터
# 가. 벡터는 자동으로 형변환이 된다. ==> 반드시 동일한 타입만 저장 가능하다.
list_value= [10,20,30,"A"]
list_value= [10,20,30,4.]
print(list_value)
vector_value = np.array(list_value)
print(vector_value)
# 나. 벡터화 연산: 벡터와 스칼라 연산
list_value= [10,20,30]
result = list_value * 2 # [10, 20, 30, 10, 20, 30]
print("파이썬의 결과:", result)
vector_value = np.array(list_value)
result = vector_value * 2 # [10 20 30] * 2 = [20 40 60] , 벡터화 연산(요소간 연산, 매우중요한 특징)
print("벡터 결과:", result)
# 다. 벡터화 연산: 벡터와 벡터 연산
list_value= [90,80,70]
list_value2= [10,20,30]
result = list_value + list_value2 # [90, 80, 70, 10, 20, 30]
print(result)
vector_value = np.array(list_value)
vector_value2 = np.array(list_value2)
result = vector_value + vector_value2 # [100 100 100],요소간 연산
print(result)
# 라. 얕은 복사(주소값복사) 와 깊은 복사(실제값복사)
list_value= [90,80,70]
s = list_value[:] # 파이썬의 슬라이싱은 깊은복사, list(), .copy()
list_value[0]=900
print(list_value)
print(s)
list_value= [10,20,30]
vector_value = np.array(list_value)
s = vector_value[:] # 벡터의 슬라이싱은 얕은복사 ==> 성능 때문에
vector_value[0]=100
print(vector_value)
print(s)
# 벡터의 깊은복사(실제값복사) 방법
list_value= [10,20,30]
vector_value = np.array(list_value)
# new_vector_value = vector_value.copy()
new_vector_value = np.copy(vector_value)
vector_value[0]= 100
print(vector_value) # [100 20 30]
print(new_vector_value) # [10 20 30] , 깊은복사이기 때문에 수정 안됨.

* 출력 화면

 

 1차원 배열 생성_Vector3_array 함수3_속성

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
나. 속성
print(dir(변수))
'''
import numpy as np
# 1. 벡터 생성
list_value= [10,20,30]
vector_value = np.array(list_value)
print("vector_value:", vector_value, type(vector_value)) # [10 20 30] <class 'numpy.ndarray'>
print("벡터의 차원크기:", vector_value.ndim) # 1
print("벡터의 형상(모양):", vector_value.shape) # (3,) # 매우 중요하다.
print("벡터의 요소갯수:", vector_value.size) # 3
print("벡터의 요소타입:", vector_value.dtype) # int32
# print(dir(np))
# print(dir(vector_value))
'''
['T', '__abs__', '__add__', '__and__', '__array__', '__array_finalize__', '__array_function__',
'__array_interface__', '__array_prepare__', '__array_priority__', '__array_struct__',
'__array_ufunc__', '__array_wrap__', '__bool__', '__class__', '__class_getitem__',
'__complex__', '__contains__', '__copy__', '__deepcopy__', '__delattr__', '__delitem__',
'__dir__', '__divmod__', '__dlpack__', '__dlpack_device__', '__doc__', '__eq__', '__float__',
'__floordiv__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__',
'__iadd__', '__iand__', '__ifloordiv__', '__ilshift__', '__imatmul__', '__imod__', '__imul__', '__index__',
'__init__', '__init_subclass__', '__int__', '__invert__', '__ior__', '__ipow__', '__irshift__', '__isub__', '__iter__',
'__itruediv__', '__ixor__', '__le__', '__len__', '__lshift__', '__lt__', '__matmul__', '__mod__', '__mul__', '__ne__',
'__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__',
'__repr__', '__rfloordiv__', '__rlshift__', '__rmatmul__', '__rmod__', '__rmul__', '__ror__', '__rpow__', '__rrshift__',
'__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__setitem__', '__setstate__', '__sizeof__', '__str__',
'__sub__', '__subclasshook__', '__truediv__', '__xor__',
'all', 'any', 'argmax', 'argmin', 'argpartition', 'argsort', 'astype', 'base', 'byteswap',
'choose', 'clip', 'compress', 'conj', 'conjugate', 'copy', 'ctypes', 'cumprod', 'cumsum', 'data',
'diagonal', 'dot', 'dtype', 'dump', 'dumps', 'fill', 'flags', 'flat', 'flatten', 'getfield', 'imag',
'item', 'itemset', 'itemsize', 'max', 'mean', 'min', 'nbytes', 'ndim', 'newbyteorder', 'nonzero', 'partition',
'prod', 'ptp', 'put', 'ravel', 'real', 'repeat', 'reshape', 'resize', 'round', 'searchsorted', 'setfield',
'setflags', 'shape', 'size', 'sort', 'squeeze', 'std', 'strides', 'sum', 'swapaxes', 'take', 'tobytes', 'tofile',
'tolist', 'tostring', 'trace', 'transpose', 'var', 'view']
'''

* 출력 화면

 

 

 1차원 배열 생성_Vector4_랜덤 함수

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
나. 랜덤함수
np.random.random() : [0.0 1.0) 범위값 반환
np.random.random(size) : [0.0 1.0) 범위값에서 size만큼 반환
np.random.rand() : 0~1사이의 균등분포에서 반환, 뽑힐 확률 동일
np.random.randn() : 정규분포에서 반환, 평균이 0이고 표준편차 1 ==> N(0,1)
np.random.randint(low, high=None) : high 미지정시 범위: [0 low) ==> 0<= 값 <low
np.random.randint(low, high) : [low high) ==> low<= 값 <high
'''
import numpy as np
# 랜덤값 고정 ==> seed 고정
# np.random.seed(1234)
arr = np.random.random() # [0.0 1.0) ==> 범위 0.0 <= <1.0
print("random() 함수:", arr, type(arr)) # <class 'float'>
arr = np.random.random(3) # [0.0 1.0) ==> 범위 0.0 <= <1.0
print("random(size) 함수:", arr, type(arr)) # <class 'numpy.ndarray'>
arr = np.random.rand() # [0.0 1.0) ==> 범위 0.0 <= <1.0
print("rand() 함수:", arr, type(arr)) # <class 'float'>
arr = np.random.rand(5) # [0.0 1.0) ==> 범위 0.0 <= <1.0
print("rand(size) 함수:", arr, type(arr)) # <class 'numpy.ndarray'>
arr = np.random.randn() # [0.0 1.0) ==> 범위 0.0 <= <1.0
print("randn() 함수:", arr, type(arr)) # <class 'float'>
arr = np.random.randn(7) # [0.0 1.0) ==> 범위 0.0 <= <1.0
print("randn(size) 함수:", arr, type(arr)) # <class 'numpy.ndarray'>
arr = np.random.randint(5) # 0 ~ 4까지의 랜덤값 반환
print("randint(low) 함수:", arr, type(arr)) # <class 'int'>
arr = np.random.randint(1,3) # 1<= < 3까지의 랜덤값 반환
print("randint(low, high) 함수:", arr, type(arr)) # <class 'int'>
arr = np.random.choice(["A","B","C"])
print("choice()", arr)
list_value=[5,2,56,67]
np.random.shuffle(list_value)
print(list_value)
# print(dir(np.random))
'''
['BitGenerator', 'Generator', 'MT19937', 'PCG64', 'PCG64DXSM', 'Philox',
'RandomState', 'SFC64', 'SeedSequence', '__RandomState_ctor', '__all__', '__builtins__',
'__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__',
'__spec__', '_bounded_integers', '_common', '_generator', '_mt19937', '_pcg64',
'_philox', '_pickle', '_sfc64',
'beta', 'binomial', 'bit_generator', 'bytes', 'chisquare', 'choice',
'default_rng', 'dirichlet', 'exponential', 'f', 'gamma', 'geometric',
'get_state', 'gumbel', 'hypergeometric', 'laplace', 'logistic', 'lognormal',
'logseries', 'mtrand', 'multinomial', 'multivariate_normal', 'negative_binomial',
'noncentral_chisquare', 'noncentral_f', 'normal', 'pareto', 'permutation',
'poisson', 'power', 'rand', 'randint', 'randn', 'random', 'random_integers',
'random_sample', 'ranf', 'rayleigh', 'sample', 'seed',
'set_state', 'shuffle', 'standard_cauchy', 'standard_exponential',
'standard_gamma', 'standard_normal', 'standard_t', 'test', 'triangular',
'uniform', 'vonmises', 'wald', 'weibull', 'zipf']
'''

* 출력 화면

 

 1차원 배열 생성_Vector5_zeros_ones

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
나. 랜덤함수
np.random.random() : [0.0 1.0) 범위값 반환
np.random.random(size) : [0.0 1.0) 범위값에서 size만큼 반환
np.random.rand() : 0~1사이의 균등분포에서 반환, 뽑힐 확률 동일
np.random.randn() : 정규분포에서 반환, 평균이 0이고 표준편차 1 ==> N(0,1)
np.random.randint(low, high=None) : high 미지정시 범위: [0 low) ==> 0<= 값 <low
np.random.randint(low, high) : [low high) ==> low<= 값 <high
다. np.zeros(size, dtype=타입)
==> 모든 요소를 0.0 으로 채운 벡터 반환
라. np.ones(size, dtype=타입)
==> 모든 요소를 1.0 으로 채운 벡터 반환
마. np.empty(size, dtype=타입)
==> 임의의 값으로 초기화 됨, 값이 작으면 대부분이 1로 설정됨.
임의의 값 초기화 확인 위해서는 size 늘려서 실습한다.
마. np.full(size, 값, , dtype=타입)
==> 지정된 값으로 초기화 됨
'''
import numpy as np
arr = np.zeros(5)
print("zeros(size):" , arr) # [0. 0. 0. 0. 0.]
arr = np.zeros(5, dtype=int) # dtype=np.int32
print("zeros(size, dtype=int):" , arr) # [0 0 0 0 0]
arr = np.ones(5)
print("ones(size):" , arr) # [1. 1. 1. 1. 1.]
arr = np.ones(5, dtype=int) # dtype=np.int32
print("ones(size, dtype=int):" , arr) # [1 1 1 1 1]
arr = np.empty(5)
print("empty(size):" , arr) #
arr = np.empty(5, dtype=int) # dtype=np.int32
print("empty(size, dtype=int):" , arr)
arr = np.full(4, 100, dtype=int) # dtype=np.int32
print("full(size, 값, , dtype=타입):" , arr) # [100 100 100 100]

* 출력 화면

 1차원 배열 생성_Vector6_arange 함수

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
나. 랜덤함수
np.random.random() : [0.0 1.0) 범위값 반환
np.random.random(size) : [0.0 1.0) 범위값에서 size만큼 반환
np.random.rand() : 0~1사이의 균등분포에서 반환, 뽑힐 확률 동일
np.random.randn() : 정규분포에서 반환, 평균이 0이고 표준편차 1 ==> N(0,1)
np.random.randint(low, high=None) : high 미지정시 범위: [0 low) ==> 0<= 값 <low
np.random.randint(low, high) : [low high) ==> low<= 값 <high
다. np.zeros(size, dtype=타입)
==> 모든 요소를 0.0 으로 채운 벡터 반환
라. np.ones(size, dtype=타입)
==> 모든 요소를 1.0 으로 채운 벡터 반환
마. np.empty(size, dtype=타입)
==> 임의의 값으로 초기화 됨, 값이 작으면 대부분이 1로 설정됨.
임의의 값 초기화 확인 위해서는 size 늘려서 실습한다.
마. np.full(size, 값, , dtype=타입)
==> 지정된 값으로 초기화 됨
바. np.arange([start],stop[,step], dtype=타입)
==> 파이썬의 range()함수 유사하다.
'''
import numpy as np
arr = np.arange(5) # np.arange(stop) ==> [0 5)범위의 벡터 반환
print("arange(stop):", arr) # [0 1 2 3 4]
arr = np.arange(1,5) # np.arange(start, stop) ==> [1 5)범위의 벡터 반환
print("arange(start, stop):", arr) # [1 2 3 4]
arr = np.arange(1,10,2) # np.arange(start, stop, step) ==> [1 10)범위의 2step 벡터 반환
print("arange(start, stop, step):", arr) # [1 3 5 7 9]
# 실수값 반환
arr = np.arange(5, dtype=np.float32) # np.arange(stop, dtype=타입) ==> [0 5)범위의 벡터 반환
print("arange(stop):", arr) # [0. 1. 2. 3. 4.]
arr = np.arange(5.)
print("arange(stop):", arr) # [0. 1. 2. 3. 4.]

* 출력 화면

 1차원 배열 생성_Vector7_linspace 함수

 

'''
배열생성
1차원 배열: 벡터(vector)
가. np.array(리스트)
나. 랜덤함수
np.random.random() : [0.0 1.0) 범위값 반환
np.random.random(size) : [0.0 1.0) 범위값에서 size만큼 반환
np.random.rand() : 0~1사이의 균등분포에서 반환, 뽑힐 확률 동일
np.random.randn() : 정규분포에서 반환, 평균이 0이고 표준편차 1 ==> N(0,1)
np.random.randint(low, high=None) : high 미지정시 범위: [0 low) ==> 0<= 값 <low
np.random.randint(low, high) : [low high) ==> low<= 값 <high
다. np.zeros(size, dtype=타입)
==> 모든 요소를 0.0 으로 채운 벡터 반환
라. np.ones(size, dtype=타입)
==> 모든 요소를 1.0 으로 채운 벡터 반환
마. np.empty(size, dtype=타입)
==> 임의의 값으로 초기화 됨, 값이 작으면 대부분이 1로 설정됨.
임의의 값 초기화 확인 위해서는 size 늘려서 실습한다.
마. np.full(size, 값, , dtype=타입)
==> 지정된 값으로 초기화 됨
바. np.arange([start],stop[,step], dtype=타입)
==> 파이썬의 range()함수 유사하다.
사. np.linspace(start, stop, size)
==> 시각화할때 많이 사용됨.
'''
import numpy as np
arr = np.linspace(1,10,10)
print("np.linspace(1,10,10):", arr) # [ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.]
arr = np.linspace(1,10,10,endpoint=False)
print("np.linspace(1,10,10):", arr) # [1. 1.9 2.8 3.7 4.6 5.5 6.4 7.3 8.2 9.1]
arr = np.linspace(0,1,11)
print("np.linspace(0,1,11):", arr) # [0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. ]

* 출력 화면

 출처

 

 

+ 강의 교재

'AI Bootcamp > Numpy' 카테고리의 다른 글

[Numpy] 1일차_1차열 배열 추가 및 삭제  (0) 2022.04.19
[Numpy] 1일차_0차열 배열  (0) 2022.04.19

0차원 배열 

 

 

 스칼라 array 함수

 

'''
배열생성
0차원 배열: 스칼라
'''
import numpy as np
print("numpy 버전:", np.__version__) # numpy 버전: 1.22.3
# 1. 스칼라 생성
s = np.array(10)
print("값:", s) # 10
print("타입:", type(s)) # <class 'numpy.ndarray'>
print("차원:", s.ndim) # 0
print("형상(모양):", s.shape) # ()
print(dir(np))
'''
['ALLOW_THREADS', 'AxisError', 'BUFSIZE', 'CLIP', 'ComplexWarning', 'DataSource',
'ERR_CALL', 'ERR_DEFAULT', 'ERR_IGNORE', 'ERR_LOG', 'ERR_PRINT', 'ERR_RAISE',
'ERR_WARN', 'FLOATING_POINT_SUPPORT', 'FPE_DIVIDEBYZERO', 'FPE_INVALID', 'FPE_OVERFLOW',
'FPE_UNDERFLOW', 'False_', 'Inf', 'Infinity', 'MAXDIMS', 'MAY_SHARE_BOUNDS', 'MAY_SHARE_EXACT',
'ModuleDeprecationWarning', 'NAN', 'NINF', 'NZERO', 'NaN', 'PINF', 'PZERO', 'RAISE', 'RankWarning',
'SHIFT_DIVIDEBYZERO', 'SHIFT_INVALID', 'SHIFT_OVERFLOW', 'SHIFT_UNDERFLOW', 'ScalarType',
'Tester', 'TooHardError', 'True_', 'UFUNC_BUFSIZE_DEFAULT', 'UFUNC_PYVALS_NAME',
'VisibleDeprecationWarning', 'WRAP', '_CopyMode', '_NoValue', '_UFUNC_API', '__NUMPY_SETUP__',
'__all__', '__builtins__', '__cached__', '__config__', '__deprecated_attrs__', '__dir__',
'__doc__', '__expired_functions__', '__file__', '__getattr__', '__git_version__', '__loader__',
'__name__', '__package__', '__path__', '__spec__', '__version__', '_add_newdoc_ufunc',
'_distributor_init', '_financial_names', '_from_dlpack', '_globals', '_mat', '_pytesttester',
'_version',
'abs', 'absolute', 'add', 'add_docstring', 'add_newdoc', 'add_newdoc_ufunc',
'alen', 'all', 'allclose', 'alltrue', 'amax', 'amin', 'angle', 'any', 'append',
'apply_along_axis', 'apply_over_axes', 'arange', 'arccos', 'arccosh', 'arcsin',
'arcsinh', 'arctan', 'arctan2', 'arctanh', 'argmax', 'argmin', 'argpartition',
'argsort', 'argwhere', 'around', 'array', 'array2string', 'array_equal', 'array_equiv',
'array_repr', 'array_split', 'array_str', 'asanyarray', 'asarray', 'asarray_chkfinite',
'ascontiguousarray', 'asfarray', 'asfortranarray', 'asmatrix', 'asscalar', 'atleast_1d',
'atleast_2d', 'atleast_3d', 'average', 'bartlett', 'base_repr', 'binary_repr', 'bincount',
'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'blackman', 'block', 'bmat',
'bool8', 'bool_', 'broadcast', 'broadcast_arrays', 'broadcast_shapes', 'broadcast_to',
'busday_count', 'busday_offset', 'busdaycalendar', 'byte', 'byte_bounds', 'bytes0',
'bytes_', 'c_', 'can_cast', 'cast', 'cbrt', 'cdouble', 'ceil', 'cfloat', 'char',
'character', 'chararray', 'choose', 'clip', 'clongdouble', 'clongfloat', 'column_stack',
'common_type', 'compare_chararrays', 'compat', 'complex128', 'complex64', 'complex_',
'complexfloating', 'compress', 'concatenate', 'conj', 'conjugate', 'convolve', 'copy',
'copysign', 'copyto', 'core', 'corrcoef', 'correlate', 'cos', 'cosh', 'count_nonzero',
'cov', 'cross', 'csingle', 'ctypeslib', 'cumprod', 'cumproduct', 'cumsum', 'datetime64',
'datetime_as_string', 'datetime_data', 'deg2rad', 'degrees', 'delete', 'deprecate',
'deprecate_with_doc', 'diag', 'diag_indices', 'diag_indices_from', 'diagflat', 'diagonal',
'diff', 'digitize', 'disp', 'divide', 'divmod', 'dot', 'double', 'dsplit', 'dstack', 'dtype',
'e', 'ediff1d', 'einsum', 'einsum_path', 'emath', 'empty', 'empty_like', 'equal', 'errstate',
'euler_gamma', 'exp', 'exp2', 'expand_dims', 'expm1', 'extract', 'eye', 'fabs', 'fastCopyAndTranspose',
'fft', 'fill_diagonal', 'find_common_type', 'finfo', 'fix', 'flatiter', 'flatnonzero', 'flexible',
'flip', 'fliplr', 'flipud', 'float16', 'float32', 'float64', 'float_', 'float_power', 'floating',
'floor', 'floor_divide', 'fmax', 'fmin', 'fmod', 'format_float_positional', 'format_float_scientific',
'format_parser', 'frexp', 'frombuffer', 'fromfile', 'fromfunction', 'fromiter', 'frompyfunc',
'fromregex', 'fromstring', 'full', 'full_like', 'gcd', 'generic', 'genfromtxt', 'geomspace',
'get_array_wrap', 'get_include', 'get_printoptions', 'getbufsize', 'geterr', 'geterrcall',
'geterrobj', 'gradient', 'greater', 'greater_equal', 'half', 'hamming', 'hanning', 'heaviside',
'histogram', 'histogram2d', 'histogram_bin_edges', 'histogramdd', 'hsplit', 'hstack', 'hypot',
'i0', 'identity', 'iinfo', 'imag', 'in1d', 'index_exp', 'indices', 'inexact', 'inf', 'info',
'infty', 'inner', 'insert', 'int0', 'int16', 'int32', 'int64', 'int8', 'int_', 'intc', 'integer',
'interp', 'intersect1d', 'intp', 'invert', 'is_busday', 'isclose', 'iscomplex', 'iscomplexobj',
'isfinite', 'isfortran', 'isin', 'isinf', 'isnan', 'isnat', 'isneginf', 'isposinf', 'isreal',
'isrealobj', 'isscalar', 'issctype', 'issubclass_', 'issubdtype', 'issubsctype', 'iterable',
'ix_', 'kaiser', 'kron', 'lcm', 'ldexp', 'left_shift', 'less', 'less_equal', 'lexsort', 'lib',
'linalg', 'linspace', 'little_endian', 'load', 'loadtxt', 'log', 'log10', 'log1p', 'log2',
'logaddexp', 'logaddexp2', 'logical_and', 'logical_not', 'logical_or', 'logical_xor', 'logspace',
'longcomplex', 'longdouble', 'longfloat', 'longlong', 'lookfor', 'ma', 'mask_indices', 'mat',
'math', 'matmul', 'matrix', 'matrixlib', 'max', 'maximum', 'maximum_sctype', 'may_share_memory',
'mean', 'median', 'memmap', 'meshgrid', 'mgrid', 'min', 'min_scalar_type', 'minimum', 'mintypecode',
'mod', 'modf', 'moveaxis', 'msort', 'multiply', 'nan', 'nan_to_num', 'nanargmax', 'nanargmin',
'nancumprod', 'nancumsum', 'nanmax', 'nanmean', 'nanmedian', 'nanmin', 'nanpercentile', 'nanprod',
'nanquantile', 'nanstd', 'nansum', 'nanvar', 'nbytes', 'ndarray', 'ndenumerate', 'ndim', 'ndindex',
'nditer', 'negative', 'nested_iters', 'newaxis', 'nextafter', 'nonzero', 'not_equal', 'numarray',
'number', 'obj2sctype', 'object0', 'object_', 'ogrid', 'oldnumeric', 'ones', 'ones_like', 'os',
'outer', 'packbits', 'pad', 'partition', 'percentile', 'pi', 'piecewise', 'place', 'poly',
'poly1d', 'polyadd', 'polyder', 'polydiv', 'polyfit', 'polyint', 'polymul', 'polynomial', 'polysub',
'polyval', 'positive', 'power', 'printoptions', 'prod', 'product', 'promote_types', 'ptp', 'put',
'put_along_axis', 'putmask', 'quantile', 'r_', 'rad2deg', 'radians', 'random', 'ravel',
'ravel_multi_index', 'real', 'real_if_close', 'rec', 'recarray', 'recfromcsv', 'recfromtxt',
'reciprocal', 'record', 'remainder', 'repeat', 'require', 'reshape', 'resize', 'result_type',
'right_shift', 'rint', 'roll', 'rollaxis', 'roots', 'rot90', 'round', 'round_', 'row_stack', 's_',
'safe_eval', 'save', 'savetxt', 'savez', 'savez_compressed', 'sctype2char', 'sctypeDict', 'sctypes',
'searchsorted', 'select', 'set_numeric_ops', 'set_printoptions', 'set_string_function', 'setbufsize',
'setdiff1d', 'seterr', 'seterrcall', 'seterrobj', 'setxor1d', 'shape', 'shares_memory', 'short',
'show_config', 'sign', 'signbit', 'signedinteger', 'sin', 'sinc', 'single', 'singlecomplex',
'sinh', 'size', 'sometrue', 'sort', 'sort_complex', 'source', 'spacing', 'split', 'sqrt', 'square',
'squeeze', 'stack', 'std', 'str0', 'str_', 'string_', 'subtract', 'sum', 'swapaxes', 'sys', 'take',
'take_along_axis', 'tan', 'tanh', 'tensordot', 'test', 'testing', 'tile', 'timedelta64', 'trace',
'tracemalloc_domain', 'transpose', 'trapz', 'tri', 'tril', 'tril_indices', 'tril_indices_from',
'trim_zeros', 'triu', 'triu_indices', 'triu_indices_from', 'true_divide', 'trunc', 'typecodes',
'typename', 'ubyte', 'ufunc', 'uint', 'uint0', 'uint16', 'uint32', 'uint64', 'uint8', 'uintc',
'uintp', 'ulonglong', 'unicode_', 'union1d', 'unique', 'unpackbits', 'unravel_index', 'unsignedinteger',
'unwrap', 'use_hugepage', 'ushort', 'vander', 'var', 'vdot', 'vectorize', 'version', 'void', 'void0',
'vsplit', 'vstack', 'warnings', 'where', 'who', 'zeros', 'zeros_like']
'''

* 출력 화면

 

 출처

 

 

+ 강의 교재

'AI Bootcamp > Numpy' 카테고리의 다른 글

[Numpy] 1일차_1차열 배열 추가 및 삭제  (0) 2022.04.19
[Numpy] 1일차_1차원 배열 생성  (0) 2022.04.19

+ Recent posts