You have to write your own matmul function which uses your approximate multiplication instead of original multiplication i.e --> *
I have used numpy to get what i wanted. Rest of the code is already available in this post.