COSMOSRKSI
방명록 RSS 태그 글쓰기 관리자
 
np.reshape에서 type error 날 때 해결 방법
Program language/Python 2021-05-13 11:15:19

numpy에서 reshape를 할 때 " typeerror order must be str not int " 라는 에러가 나오면 

 

아마 이 글을 보고 있는 분은 이렇게 코드를 쳤을 것이다.

 

np.reshape(xx0, xn*xn, 1)

 

여기서 맨 뒤 1을

 

np.reshape(xx0, xn*xn, 'F') 이렇게 'F'로 바꾸어 주면 해결된다.



프로테우스에서 소스 코드 디버깅 하는 방법
MCU(MicroController Unit) 2021-05-02 23:32:35

1. code vision, AVR studio, microchip studio 등으로 소스코드를 컴파일 하면 컴파일한 파일 경로에 .cof라는 확장자의 파일이 있음

 

2. 프로테우스에서 MCU를 클릭하면 프로그램 파일(Program file:) 넣는 경로에서 .cof 확장자 파일을 찾아서 업로드함

 

3. 메뉴에서 Debug - Start VSM Debugging 혹은 컨트롤 + f12를 누름

 

4. 만약 cof 확장자 파일이 제대로 업로드 되었고 3번 항목을 제대로 했다면 화면이 아래와 같이 나옴

 

5. Debug - AVR에서 자신이 디버깅 하고자 하는 창을 띄울 수 있음

 

6. 소스코드 라인을 더블 클릭하여 중단점 설정할 수 있으며 그 후 f12 눌러서 시뮬레이션을 실행함 

만약 시뮬레이션 실행중 중단점을 만나면 그때 부터 디버깅 가능 

디버깅 할때에는 f10누르면 step over, f11누르면 step into임

중단점 해제할 때에는 소스코드에서 중단점 설정한 곳을 더블클릭 2번 해야됨

1번만 더블클릭하면 빈 빨간색원만 생겨서 또 중단됨

 

 

누군가에게 도움이 되었기를 바라며...



[C++] 구조체와 포인터
Program language/C++ 2021-04-22 20:16:40

#include <iostream>
#include <string>
#include <cstring>
using namespace std;

typedef struct _student {
char name[20];
int age;
}student;

void main()
{
student std1;
student* pstd1 = &std1;
cin >> pstd1->age;
cin >> pstd1->name;
cout << pstd1->age;
cout << pstd1->name;
}

 

-------------------------------

 

#include <iostream>
#include <string>
#include <cstring>
using namespace std;

struct student {
char name[20];
int age;
};

void main()
{
struct student std1;
struct student* pstd1 = &std1;

cin >> pstd1->name;
cin >> pstd1->age;

cout << pstd1->name;
cout << pstd1->age;
}



[C] Max(a,b) ((a>b) ? a:b)
Program language/C 2021-04-13 10:54:09

#define Max(a,b) ((a>b) ? a:b)

 

 




이 사이트에는
넥슨코리아에서 제공한 넥슨 Lv.1 고딕 Regular체,
카페24가 제작한 아네모네체,
Cadson Demak가 디자인한 Kanit체,
Sandoll이 디자인한 나눔고딕체가
적용되어 있습니다.
멋진 폰트를 무료로 제공해주셔서 감사합니다.

Copyleft ⓒ bskyvision (블루스킨 v1.2)