본문 바로가기

기계는 거짓말하지 않는다

검색하기
기계는 거짓말하지 않는다
프로필사진 KillinTime

  • 분류 전체보기 (330)
    • C (15)
    • C++ (4)
    • C# (13)
    • Java (1)
    • Git (6)
    • Python (107)
    • Web (12)
      • Spring Boot (6)
      • JS (4)
      • HTML (0)
    • AI (35)
    • Linux (66)
    • Container Tools (10)
      • Docker (9)
      • Kubernetes (1)
    • DB (12)
      • MySQL (12)
    • IDE (14)
      • STS (1)
      • Visual Studio (6)
      • VS Code (7)
    • SDK (1)
      • NVIDIA DeepStream (1)
    • Development Related (2)
    • Program (5)
    • Programming Test (13)
    • Tech Tips (2)
    • Others (12)
      • 잡담 (3)
      • Guitar (9)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/10   »
일 월 화 수 목 금 토
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
  • label
  • 오류
  • C++
  • Linux
  • 기타 연주
  • C
  • C#
  • error
  • pytorch
  • YOLO
  • Docker
  • windows forms
  • nvidia-smi
  • pip
  • JSON
  • Visual Studio
  • 컨테이너
  • ubuntu
  • Python
  • SSH
  • 프로그래머스
  • 핑거스타일
  • VS Code
  • 채보
  • Selenium
  • OpenCV
  • Numpy
  • paramiko
  • pandas
  • mysql
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록filter (1)

기계는 거짓말하지 않는다

Python Numpy any Filter

Numpy의 any를 이용한 필터 import numpy as np num_in_array = np.array([0]) x = np.array([ [2 ,33 ,1 ,6 ,24 ,0], [2 ,56 ,2 ,3 ,8 ,5], [1 ,2 ,12 ,65 ,4 ,1], [9 ,22 ,77 ,4 ,3 ,10], [15 ,0 ,2 ,73 ,2 ,3], [2 ,42 ,19 ,11 ,55 ,0] ]) # Filter by num_in_array if num_in_array is not None: print(x[:, 5:6] == num_in_array) print((x[:, 5:6] == num_in_array).any(1)) # 마지막 열이 num_in_array안의 숫자와 하나라도 일치할 경우 # any의 매개변수..

Python 2021. 8. 15. 14:22
Prev 1 Next

티스토리툴바