Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- JAX
- matplotlib
- obsidian
- 우분투
- Julia
- 딥러닝
- 텝스
- WOX
- ChatGPT
- IEEE
- pytorch
- 논문작성법
- Dear abby
- 옵시디언
- teps
- 텝스공부
- Statics
- 수치해석
- 에러기록
- 고체역학
- LaTeX
- 생산성
- MATLAB
- Python
- 수식삽입
- 인공지능
- Linear algebra
- 논문작성
- Numerical Analysis
- Zotero
Archives
- Today
- Total
뛰는 놈 위에 나는 공대생
[SciPy] ValueError: One of the requested xi is out of bounds in dimension 0 본문
기타
[SciPy] ValueError: One of the requested xi is out of bounds in dimension 0
보통의공대생 2023. 2. 28. 16:34scipy에 있는 scipy.interpolate.RegularGridInterpolator를 쓸 때 발생했던 오류이다.
코드를 좀 살펴보면 내가 interpolation하기 위해 넣은 값이 내삽을 위해 지정된 값 범위에서 벗어날 때 return하는 오류이다.
예를 들어 나는 x=[0,1,2,3,4]일 때의 y값을 넣어놨는데 만약 x=5.5값을 넣으면 범위 밖에 벗어나므로 처리할 수 없다.
ValueError: One of the requested xi is out of bounds in dimension 0
나의 경우에는 내가 x값을 잘못 넣었기 때문에 이런 일이 일어난 거지만 만약 외삽(extrapolate)을 원하는 경우라면
다음과 같이 bounds_error = False로 지정하고 fill_value=None으로 지정해서 외삽도 가능한 것으로 보인다.
'기타' 카테고리의 다른 글
[WOX] WOX에 네이버, 네이버사전 검색 추가하기 (0) | 2023.03.29 |
---|---|
[생산성] 코드 및 문서 비교할 때 유용한 툴 (0) | 2023.03.16 |
[에러기록] ImportError: cannot import name 'index_update' from 'jax.ops' (0) | 2023.02.24 |
[기타] 티스토리 광고 정책 변경 (0) | 2023.01.04 |
[기록] C드라이브 포맷 후 D드라이브에 있는 프로그램 인식 안됨 (0) | 2022.12.23 |
Comments