How do you find Lp-norm without using any python library?
def norm(vec, p):
# p is scalar
# where vec is a vector in list type
pass
How do you find Lp-norm without using any python library?
def norm(vec, p):
# p is scalar
# where vec is a vector in list type
pass
Copyright © 2021 Jogjafile Inc.
Using numpy for instance would be more efficient, but with bare python you can do: