Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/p/y/pyoperators-HEAD/test/test_partition.py   pyoperators(Download)
from pyoperators.utils.testing import (
    assert_eq, assert_is_instance, assert_raises, assert_is_type)
from .common import Stretch
 
 
    def func(axisp, p, axiss):
        op = BlockDiagonalOperator(3*[Stretch(axiss)], partitionin=p,
                                   axisin=axisp)
        assert_eq(op(i), Stretch(axiss)(i))
    for axisp, p in zip(
    def func(axisp, axiss):
        op = BlockDiagonalOperator(shape[axisp]*[Stretch(axiss)],
                                   new_axisin=axisp)
        axisp_ = axisp if axisp >= 0 else axisp + 4
        axiss_ = axiss if axisp_ > axiss else axiss + 1

src/p/y/pyoperators-0.11.1/test/test_partition.py   pyoperators(Download)
from pyoperators.utils.testing import (
    assert_eq, assert_is_instance, assert_raises, assert_is_type)
from .common import Stretch
 
 
    def func(axisp, p, axiss):
        op = BlockDiagonalOperator(3*[Stretch(axiss)], partitionin=p,
                                   axisin=axisp)
        assert_eq(op(i), Stretch(axiss)(i))
    for axisp, p in zip(
    def func(axisp, axiss):
        op = BlockDiagonalOperator(shape[axisp]*[Stretch(axiss)],
                                   new_axisin=axisp)
        axisp_ = axisp if axisp >= 0 else axisp + 4
        axiss_ = axiss if axisp_ > axiss else axiss + 1