Python

bytes 를 numpy ndarray 로 바꾸고싶습니다.

gu

gunudurumi
답변 대기중
30 XP

def normalize(self, data: bytes) -> np.ndarray:
normalized = np.frombuffer(data, dtype=float)
map(lambda x: x / self.sampleWidth, normalized )
return normalized

했는데

bytes 의 크기는 25750744 였는데 nomalize 후에는 3218843 가 되네요..

도와주시면 감사하겠습니다 ㅠ


불러오는 중...