Here is my code:
import numpy as np
from scipy.integrate import odeint
import math
y0=np.array([1,3,2,3,5])
b=np.array([[1],[3],[4],[2],[5]])
\'\'\'generate ma
Try changing the order of the arguments of your function to def g(y,t,B). That made the error message go away. You'll want to verify that the math is doing what you expect.
The documentation of odeint says, "The first two arguments of f(t, y, ...) are in the opposite order..."
The output array from the function depends on what is the input.
To ensure that your initial condition is 1-dimensional, you can reshape the y0 array.
y0_reshaped = y0.reshape(n,)
where n is the number of elements in your y0 vector