#! /usr/bin/env python # -*- coding: utf-8 -*- """ Solve a system of simultaneous equation in two variables of the form 2 * x + 7 * y = 17. 3 * x - 5 * y = -21. reference : http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.solve.html """ # import numpy as np a = np.array([[2.,7.],[3.,-5.]]) # coefs matrice b = np.array([[17.],[-21.]]) # independent coef vector print(np.linalg.solve(a,b)) # solution