From 9c24abb13e736f95f820e7dc037314298f279020 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl <alexfikl@gmail.com> Date: Mon, 18 Oct 2021 19:16:43 -0500 Subject: [PATCH] remove unused _scalar_list_norm --- arraycontext/fake_numpy.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/arraycontext/fake_numpy.py b/arraycontext/fake_numpy.py index db5ff55..4e26880 100644 --- a/arraycontext/fake_numpy.py +++ b/arraycontext/fake_numpy.py @@ -210,21 +210,6 @@ class BaseFakeNumpyNamespace: # {{{ BaseFakeNumpyLinalgNamespace -def _scalar_list_norm(ary, ord): - if ord is None: - ord = 2 - - from numbers import Number - if ord == np.inf: - return max(ary) - elif ord == -np.inf: - return min(ary) - elif isinstance(ord, Number) and ord > 0: - return sum(iary**ord for iary in ary)**(1/ord) - else: - raise NotImplementedError(f"unsupported value of 'ord': {ord}") - - def _reduce_norm(actx, arys, ord): from numbers import Number from functools import reduce -- GitLab