Skip to content
Snippets Groups Projects
Select Git revision
  • 627620935517d87f5d9a09f5acc9e0f95d166895
  • master default protected
  • v3.1.1
  • v3.1.0
  • v3.0.1
  • v3.0.0
  • v2.1.3
  • v2.1.2
  • v2.1.1
  • v2.1.0
  • v2.0.0
  • v1.2.1
  • v1.2.0
  • v1.1.3
14 results

check_test_output.py

Blame
  • numpy_do.py 521 B
    # Data object module for NIFTy that uses simple numpy ndarrays.
    
    import numpy as np
    from numpy import ndarray as data_object
    from numpy import full, empty, sqrt, ones, zeros, vdot, abs, bincount, exp, log
    from .random import Random
    
    
    def from_object(object, dtype=None, copy=True):
        return np.array(object, dtype=dtype, copy=copy)
    
    
    def from_random(random_type, shape, dtype=np.float64, **kwargs):
        generator_function = getattr(Random, random_type)
        return generator_function(dtype=dtype, shape=shape, **kwargs)