Skip to content

Instantly share code, notes, and snippets.

@negedng
Last active January 1, 2020 20:23
Show Gist options
  • Save negedng/6d00745ebbae76e40b4021d660debbdb to your computer and use it in GitHub Desktop.
Save negedng/6d00745ebbae76e40b4021d660debbdb to your computer and use it in GitHub Desktop.
def lin_map_matrix(FV, W):
"""For ß basis in V and γ basis in W,
returns with the [T]^γ_ß matrix of the transformation T,
which transforms v in V to fv in FV"""
return np.transpose([np.linalg.solve(np.transpose(W), fv) for fv in FV])
def linmap_predict(v, M, V, W):
return np.matmul(np.transpose(W),np.matmul(M,np.linalg.solve(np.transpose(V),v)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment