Skip to content

Instantly share code, notes, and snippets.

@MatthewCaseres
Created August 6, 2022 00:54
Show Gist options
  • Save MatthewCaseres/96ee870ca865306eaa25b19faa5fd447 to your computer and use it in GitHub Desktop.
Save MatthewCaseres/96ee870ca865306eaa25b19faa5fd447 to your computer and use it in GitHub Desktop.
import jax.numpy as jnp
from pymort import getIdGroup, MortXML
ids = getIdGroup(3299).ids
select = jnp.array([MortXML(id).Tables[0].Values.unstack().values for id in ids])
ultimate = jnp.array([MortXML(id).Tables[1].Values.unstack().values for id in ids])
assert select.shape == (10, 78, 25) # tableIds [3299, 3308], issue_ages [18, 95], durations [1, 25]
assert ultimate.shape == (10, 103) # tableIds [3299, 3308], attained_ages [18, 120]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment