pcubillos/pytips

Make a Python wrapper

Closed this issue · 0 comments

The tips() function in the C ctips module only takes numpy arrays as argument.

The Python wrap (tips.py?) will allow the user to make the calls with different argument types and shapes. E.g.:

import tips as t
# pf = t.tips(molID, isoID, temp)

# Inputs as integers (cast temp into a double):
pf = t.tips(1, 161, 300)
# Isotope IDs as an array (while others are single valued):
pf = t.tips(1, [161,171, 162], 300)
# Temperatures as an array (while others are single valued):
pf = t.tips(1, 161, [100, 200, 300, 400])

The wrapper should, internally:

  • format the arguments into numpy arrays, and
  • cast the temperature to double.