summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorJakob Jorgensen, WS at HMXIF <jakob.jorgensen@manchester.ac.uk>2019-06-12 18:10:38 +0100
committerJakob Jorgensen, WS at HMXIF <jakob.jorgensen@manchester.ac.uk>2019-06-12 18:10:38 +0100
commit1c1b7fc260743e56bf02fa1f26c3a04b713ebcda (patch)
tree7c3c1c6047c9e27ec0f79aac6091ed6c2f23b18e /Wrappers/Python
parentd7fa15c50ee9155ac24ecfa88ca74b111690532e (diff)
downloadframework-1c1b7fc260743e56bf02fa1f26c3a04b713ebcda.tar.gz
framework-1c1b7fc260743e56bf02fa1f26c3a04b713ebcda.tar.bz2
framework-1c1b7fc260743e56bf02fa1f26c3a04b713ebcda.tar.xz
framework-1c1b7fc260743e56bf02fa1f26c3a04b713ebcda.zip
replace default for dot by numpy
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-xWrappers/Python/ccpi/framework/framework.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/framework/framework.py b/Wrappers/Python/ccpi/framework/framework.py
index 7236e0e..e0e1770 100755
--- a/Wrappers/Python/ccpi/framework/framework.py
+++ b/Wrappers/Python/ccpi/framework/framework.py
@@ -764,14 +764,14 @@ class DataContainer(object):
return numpy.sqrt(self.squared_norm())
def dot(self, other, *args, **kwargs):
'''return the inner product of 2 DataContainers viewed as vectors'''
- method = kwargs.get('method', 'reduce')
+ method = kwargs.get('method', 'numpy')
if method not in ['numpy','reduce']:
raise ValueError('dot: specified method not valid. Expecting numpy or reduce got {} '.format(
method))
if self.shape == other.shape:
# return (self*other).sum()
if method == 'numpy':
- return numpy.dot(self.as_array().ravel(), other.as_array())
+ return numpy.dot(self.as_array().ravel(), other.as_array().ravel())
elif method == 'reduce':
# see https://github.com/vais-ral/CCPi-Framework/pull/273
# notice that Python seems to be smart enough to use