|
Last change
on this file was 25688, checked in by jdquinn, 5 years ago |
|
CHG: MATLAB -> Python translations in support of tests 2005 and 2006 (still have errors to work out here); clean up; various minor improvements
|
|
File size:
332 bytes
|
| Line | |
|---|
| 1 | def qmupart2npart(vector):
|
|---|
| 2 | # Vector is full of -1 (no partition) and 0 to npart. We need to identify
|
|---|
| 3 | # npart.
|
|---|
| 4 | npart = int(vector.max() + 1) # cast to int as we may have a NumPy floating point type, which cannot be used as an argument to function range (see src/m/qmu/setupdesign/QmuSetupVariables.py)
|
|---|
| 5 |
|
|---|
| 6 | return npart
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.