Changeset 3c56da87 in sasmodels for sasmodels/alignment.py
- Timestamp:
- Mar 5, 2015 12:55:38 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c
- Parents:
- b89f519
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/alignment.py
rff7119b r3c56da87 34 34 return view 35 35 36 def align_data( v, dtype, alignment=128):36 def align_data(x, dtype, alignment=128): 37 37 """ 38 38 Return a copy of an array on the alignment boundary. 39 39 """ 40 # if v is contiguous, aligned, and of the correct type then just return v41 view = align_empty( v.shape, dtype, alignment=alignment)42 view[:] = v40 # if x is contiguous, aligned, and of the correct type then just return x 41 view = align_empty(x.shape, dtype, alignment=alignment) 42 view[:] = x 43 43 return view 44 44
Note: See TracChangeset
for help on using the changeset viewer.