Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols translation #1

Open
albop opened this issue Mar 22, 2016 · 0 comments
Open

Symbols translation #1

albop opened this issue Mar 22, 2016 · 0 comments

Comments

@albop
Copy link
Member

albop commented Mar 22, 2016

Variables, with optional time subscripts and indices should have three equivalent representations:

  1. object (example Symbol(name='β', subscripts=['i'], date=1)
  2. normalized string (example β__1__i)
  3. latex: (\beta_{i,t+1})

We can define the expected correspondences in https://github.com/EconForge/dolang/blob/master/tests/symbols.yaml .

We should define formally what arguments the objects accept

  • name: any valid python/julia identifier without a double underscore ?
  • date: signed integer (for now)
  • subscripts: list of names

As for the normalized string, initial proposal is: {}__{}__{}'.format(name, (str(date) if date>=0 else 'm'+str(date), str.join('_', subscripts)

So, currently, there is an implementation for 1.->2. under python only. I am not checking the tickbox though until we are sure about the definition/normalization.

[] python: 1.->2.
[] python: 1.->3.
[] python: 2.->1.
[] python: 3.->1. (not urgent)

[] julia: 1.->2.
[] julia: 1.->3.
[] julia: 2.->1.
[] julia: 3.->1. (not urgent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant