task: metadata: install: pip install -e .
patch: diff --git a/sdepy/infrastructure.py b/sdepy/infrastructure.py
index dc873b3..d557ea4 100644
--- a/sdepy/infrastructure.py
+++ b/sdepy/infrastructure.py
@@ -796,7 +796,8 @@ class process(np.ndarray):
         the minimum process value attained across paths.
         """
         return process(t=self.t,
-                       v=self.min(axis=-1, out=out))
+                       x=self.min(axis=-1, out=out,
+                                  keepdims=True))
 
     def pmax(self, out=None):
         """
@@ -804,7 +805,8 @@ class process(np.ndarray):
         the maximum process value attained across paths.
         """
         return process(t=self.t,
-                       v=self.max(axis=-1, out=out))
+                       x=self.max(axis=-1, out=out,
+                                  keepdims=True))
 
     def psum(self, dtype=None, out=None):
         """
@@ -855,14 +857,16 @@ class process(np.ndarray):
         process value attained along time.
         """
         return process(t=self.t[:1],
-                       x=self.min(axis=0, out=out)[np.newaxis, ...])
+                       x=self.min(axis=0, out=out,
+                                  keepdims=True))
 
     def tmax(self, out=None):
         """Constant process exposing for each path the maximum
         process value attained along time.
         """
         return process(t=self.t[:1],
-                       x=self.max(axis=0, out=out)[np.newaxis, ...])
+                       x=self.max(axis=0, out=out,
+                                  keepdims=True))
 
     def tsum(self, dtype=None, out=None):
         """

problem_statement: Process methods 'pmin', 'pmax', 'tmin', 'tmax': bug in 'out' parameter handling
The ``out`` parameter of summary methods for the ``process`` class is expected to behave as the ``out`` parameter of the corresponding ``numpy.ndarray`` methods, to which it is actually passed through. In particular, its shape should match the shape of the resulting summarized process.

For the methods in question, a properly sized ``out`` array causes a ``ValueError`` to be raised in numpy, while omitting the leading or trailing one dimensional axis is in fact required. This behavior is in contrast with that of all other summary methods, and is regarded as a bug to be fixed.
repo: sdepy/sdepy
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/sdepy/tests/test_process.py b/sdepy/tests/test_process.py
index 26bea8d..5a7f2ad 100644
--- a/sdepy/tests/test_process.py
+++ b/sdepy/tests/test_process.py
@@ -582,28 +582,63 @@ def test_summary():
 
     # summary across paths
     for f in funcs:
+        # test values
         a = getattr(p, 'p' + f)()
-        b = getattr(np, f)(p, axis=-1)
-        assert_allclose(a, b[..., np.newaxis], rtol=eps(p.dtype))
-        a = p.pmean(dtype=np.float32)
+        b = getattr(np, f)(p, axis=-1)[..., np.newaxis]
+        assert_allclose(a, b, rtol=eps(p.dtype))
+        # test out parameter
+        y = np.full((3, 5, 7, 1), np.nan)
+        a = getattr(p, 'p' + f)(out=y)
+        assert_(a.base is y)
+        assert_allclose(y, b, rtol=eps(p.dtype))
+    for f in ('sum', 'mean', 'var', 'std'):
+        # test dtype parameter
+        a = getattr(p, 'p' + f)(dtype=np.float32)
         assert_(a.dtype == np.float32)
-        b = p.pvar(ddof=1, out=a)
-        assert_allclose(b, p.var(ddof=1, axis=-1)[..., np.newaxis],
-                        rtol=eps(np.float32))
+    # test ddof parameter for pvar and pstd
+    a = p.pvar(ddof=1)
+    assert_allclose(a, p.var(ddof=1, axis=-1)[..., np.newaxis],
+                    rtol=eps(p.dtype))
+    a = p.pstd(ddof=1)
+    assert_allclose(a, p.std(ddof=1, axis=-1)[..., np.newaxis],
+                    rtol=eps(p.dtype))
 
     # summary along the timeline
     for f in funcs:
+        # test values
         a = getattr(p, 't' + f)()
-        b = getattr(np, f)(p, axis=0)
-        assert_allclose(a, b[np.newaxis, ...], rtol=eps(p.dtype))
-        a = p.tmean(dtype=np.float32)
-        assert_(a.dtype == np.float32)
-        b = p.tvar(ddof=1, out=a)
-        assert_allclose(b, p.var(ddof=1, axis=0)[np.newaxis, ...],
-                        rtol=eps(np.float32))
-        a = p.tcumsum()
-        b = np.cumsum(p, axis=0)
+        b = getattr(np, f)(p, axis=0)[np.newaxis, ...]
         assert_allclose(a, b, rtol=eps(p.dtype))
+        # test out parameter
+        y = np.full((1, 5, 7, 11), np.nan)
+        a = getattr(p, 't' + f)(out=y)
+        assert_(a.base is y)
+        assert_allclose(y, b, rtol=eps(p.dtype))
+    for f in ('sum', 'mean', 'var', 'std'):
+        # test dtype parameter
+        a = getattr(p, 't' + f)(dtype=np.float32)
+        assert_(a.dtype == np.float32)
+
+    # test ddof parameter for tvar and tstd
+    a = p.tvar(ddof=1)
+    assert_allclose(a, p.var(ddof=1, axis=0)[np.newaxis, ...],
+                    rtol=eps(p.dtype))
+    a = p.tstd(ddof=1)
+    assert_allclose(a, p.std(ddof=1, axis=0)[np.newaxis, ...],
+                    rtol=eps(p.dtype))
+
+    # test tcumsum values
+    a = p.tcumsum()
+    b = np.cumsum(p, axis=0)
+    assert_allclose(a, b, rtol=3*eps(p.dtype))
+    # test tcumsum out parameter
+    y = np.full((3, 5, 7, 11), np.nan)
+    a = p.tcumsum(out=y)
+    assert_(a.base is y)
+    assert_allclose(y, b, rtol=3*eps(p.dtype))
+    # test tcumsum dtype parameter
+    a = p.tcumsum(dtype=np.float32)
+    assert_(a.dtype == np.float32)
 
     # numpy summary operations
     for f in funcs: