반응형
해결 방법
np.sctypeDict
외에도 다음과 같은 변수가 있습니다.
In [141]: np.typecodes
Out[141]:
{'All': '?bhilqpBHILQPefdgFDGSUVOMm',
'AllFloat': 'efdgFDG',
'AllInteger': 'bBhHiIlLqQpP',
'Character': 'c',
'Complex': 'FDG',
'Datetime': 'Mm',
'Float': 'efdg',
'Integer': 'bhilqp',
'UnsignedInteger': 'BHILQP'}
In [143]: np.sctypes
Out[143]:
{'complex': [numpy.complex64, numpy.complex128, numpy.complex192],
'float': [numpy.float16, numpy.float32, numpy.float64, numpy.float96],
'int': [numpy.int8, numpy.int16, numpy.int32, numpy.int32, numpy.int64],
'others': [bool, object, str, unicode, numpy.void],
'uint': [numpy.uint8, numpy.uint16, numpy.uint32, numpy.uint32, numpy.uint64]}
참조 페이지 https://stackoverflow.com/questions/13997087
반응형
'파이썬' 카테고리의 다른 글
파이썬 Python : sys.exit 또는 SystemExit 차이점 및 제안 사용 (0) | 2021.01.31 |
---|---|
파이썬에서 순진한 datetime 인스턴스에 시간대를 추가하는 방법 (0) | 2021.01.31 |
파이썬 items () 대신 iteritems ()를 언제 사용해야합니까? (0) | 2021.01.31 |
파이썬 Python에서 임의의 16 진수 색상 생성 (0) | 2021.01.31 |
파이썬 socket.sendto (0) | 2021.01.30 |
댓글