Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def volume(simplex, ys=None):
# Notice the parameter ys is there so you can use this volume method as
# as loss function
matrix = np.subtract(simplex[:-1], simplex[-1], dtype=float)
# See https://www.jstor.org/stable/2315353
dim = len(simplex) - 1
vol = np.abs(fast_det(matrix)) / np.math.factorial(dim)
return vol