Skip to content

Instantly share code, notes, and snippets.

@escherize
Created June 12, 2019 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save escherize/7a8c5d4d8bfcbfa0dba672dd62106338 to your computer and use it in GitHub Desktop.
Save escherize/7a8c5d4d8bfcbfa0dba672dd62106338 to your computer and use it in GitHub Desktop.
import numpy as np
a = np.array([[6, 0, 0], [2, 2, 2], [0, 1, 3]])
b = np.array([30, 20, 13])
[shoe, boy, whistle] = np.linalg.solve(a,b)
print("\nshoe=", shoe, "\nboy=", boy, "\nwhistle=", whistle)
print("shoe + boy * whistle = ", shoe + boy * whistle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment