Example #1
0
def test_deprecated_module():
    with warnings.catch_warnings(record=True) as s:
        nu.deprecated_module('foo', msg='msg')
        nt.ok_(len(s) > 0)
Example #2
0
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

'''Basic functions and iterators for neuron neurite triplet morphometrics

'''
import functools
from .point_tree import PointTree
from .core import iter_neurites
from neurom import morphmath as mm
from neurom.utils import deprecated_module


deprecated_module(__name__)

iter_type = PointTree.itriplet


def triplet_function(as_tree=False):
    '''Decorate a triples function such that it can be used in neurite iteration

    Parameters:
        as_tree: specifies whether the function argument is a\
            triplet of trees or elements
    '''
    def _triplet_function(fun):
        '''Decorate a function with an iteration type member'''
        @functools.wraps(fun)
        def _wrapper(triplet):
Example #3
0
def test_deprecated_module():
    with warnings.catch_warnings(record=True) as s:
        nu.deprecated_module('foo', msg='msg')
        nt.ok_(len(s) > 0)