convert sweepfunc array to int with check
convert sweepfunc array to int with check

- sweepfunc is array of indices, starting to
  get warning complaining that non-integer index
  is deprecated.
- include check that values in sweepfunc are not
  changing, to avoid silencing errors if non-int
  sweepfunc values are ever generated.

awbirdsall/popmodel