Skip to main content
edited body
Source Link
toolic
  • 16.4k
  • 6
  • 29
  • 221

Documentation

Add documentation to the top of your file to describe the purpose of your code.

Naming

Some of your variables have meaningful names, but others are not too descriptive. It is fine to have some variables with short names, bitbut in those cases, you should add comments to describe them. For example, dt, Y, t, etc.

You could also use more descriptive names for your functions: fd, etc.

Output

You could print out the description of the text output. I see this when I run the code:

(3, 950) (950,) 

It would be helpful to see what those numbers refer to.

You could add descriptive labels labels to the plot:

plt.plot(Y.T) plt.title("stuff") plt.xlabel("x stuff") plt.ylabel("y stuff") plt.show() 

Unused code

It seems the following code is not needed:

np.random.seed(2) 

It is a good idea to remove unused code.

Documentation

Add documentation to the top of your file to describe the purpose of your code.

Naming

Some of your variables have meaningful names, but others are not too descriptive. It is fine to have some variables with short names, bit in those cases, you should add comments to describe them. For example, dt, Y, t, etc.

You could also use more descriptive names for your functions: fd, etc.

Output

You could print out the description of the text output. I see this when I run the code:

(3, 950) (950,) 

It would be helpful to see what those numbers refer to.

You could add descriptive labels labels to the plot:

plt.plot(Y.T) plt.title("stuff") plt.xlabel("x stuff") plt.ylabel("y stuff") plt.show() 

Unused code

It seems the following code is not needed:

np.random.seed(2) 

It is a good idea to remove unused code.

Documentation

Add documentation to the top of your file to describe the purpose of your code.

Naming

Some of your variables have meaningful names, but others are not too descriptive. It is fine to have some variables with short names, but in those cases, you should add comments to describe them. For example, dt, Y, t, etc.

You could also use more descriptive names for your functions: fd, etc.

Output

You could print out the description of the text output. I see this when I run the code:

(3, 950) (950,) 

It would be helpful to see what those numbers refer to.

You could add descriptive labels labels to the plot:

plt.plot(Y.T) plt.title("stuff") plt.xlabel("x stuff") plt.ylabel("y stuff") plt.show() 

Unused code

It seems the following code is not needed:

np.random.seed(2) 

It is a good idea to remove unused code.

Source Link
toolic
  • 16.4k
  • 6
  • 29
  • 221

Documentation

Add documentation to the top of your file to describe the purpose of your code.

Naming

Some of your variables have meaningful names, but others are not too descriptive. It is fine to have some variables with short names, bit in those cases, you should add comments to describe them. For example, dt, Y, t, etc.

You could also use more descriptive names for your functions: fd, etc.

Output

You could print out the description of the text output. I see this when I run the code:

(3, 950) (950,) 

It would be helpful to see what those numbers refer to.

You could add descriptive labels labels to the plot:

plt.plot(Y.T) plt.title("stuff") plt.xlabel("x stuff") plt.ylabel("y stuff") plt.show() 

Unused code

It seems the following code is not needed:

np.random.seed(2) 

It is a good idea to remove unused code.