This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Dec 21 11:13:32 2016 | |
@author: kohr | |
""" | |
# %% --- Basic stuff from pygpu/reduction.py --- # | |
import math |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def as_tensor_space(pspace, axis=None): | |
"""Convert a `ProductSpace` of `TensorSpace`'s to a tensor space. | |
Parameters | |
---------- | |
pspace : `ProductSpace` | |
Power space (with arbitrary shape) whose base is a `TensorSpace`. | |
axis : int or sequence of int, optional | |
Indices at which the powers should be inserted as new axes. | |
For the default ``None``, the power axes are added to the left. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...]\_pytest\config\__init__.py:518: UsageError | |
____ ERROR at setup of [doctest] odl.util.utility.NumpyRandomSeed.__init__ ____ | |
self = <CallInfo when='setup' exception: Plugin specs must be a ','-separated string or a list/tuple of strings for plugin names. Given: <module 'odl.util.pytest_plugins' from '[...]\\odl\\util\\pytest_plugins.py'>> | |
func = <function call_runtest_hook.<locals>.<lambda> at 0x00000000054AB620> | |
when = 'setup', treat_keyboard_interrupt_as_exception = False | |
def __init__(self, func, when, treat_keyboard_interrupt_as_exception=False): | |
#: context of invocation: one of "setup", "call", | |
#: "teardown", "memocollect" |