landlab.utils.add_halo¶
- add_halo(data, halo=1, halo_value=None)[source]¶
Add a halo of no data value to data.
- Parameters:
Examples
>>> import numpy as np >>> from landlab.utils import add_halo >>> data = np.array([[1, 2, 3], [4, 5, 6]]) >>> add_halo(data, halo_value=9) array([[9, 9, 9, 9, 9], [9, 1, 2, 3, 9], [9, 4, 5, 6, 9], [9, 9, 9, 9, 9]])