Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/tests/test_mroi.py   nipy(Download)
 
import numpy as np
from ..mroi import subdomain_from_array, subdomain_from_balls
from ..discrete_domain import domain_from_binary_array
 
def test_sd_from_ball():
    dom = domain_from_binary_array(np.ones((10, 10)))
    radii = np.array([2, 2, 2])
    positions = np.array([[3, 3], [3, 7], [7, 7]])
    subdomain = subdomain_from_balls(dom, positions, radii)