Coder Social home page Coder Social logo

justindujardin / mathy Goto Github PK

View Code? Open in Web Editor NEW
130.0 130.0 158.0 69.81 MB

Tools for using computer algebra systems to solve math problems step-by-step with reinforcement learning

Home Page: https://mathy.ai

License: MIT License

Python 59.74% Shell 1.09% TypeScript 0.54% CSS 0.77% JavaScript 2.41% Jupyter Notebook 35.46%
computer-algebra-system machine-learning math mathy python3 reinforcement-learning symbolic-math trees

mathy's Issues

Cannot install mathy

When trying to install mathy, I get the following error:

$ pip install mathy
Collecting mathy
  Using cached mathy-0.9.5-py3-none-any.whl (9.5 kB)
Collecting numpy<1.23.0,>=1.21.0 (from mathy)
  Using cached numpy-1.22.4.zip (11.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting colr (from mathy)
  Using cached Colr-0.9.1.tar.gz (116 kB)
  Preparing metadata (setup.py) ... done
Collecting srsly (from mathy)
  Using cached srsly-2.4.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (490 kB)
Collecting pydantic>=1.0.0 (from mathy)
  Using cached pydantic-1.10.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting typer<0.7.0,>=0.6.1 (from mathy)
  Using cached typer-0.6.1-py3-none-any.whl (38 kB)
Collecting wasabi (from mathy)
  Using cached wasabi-1.1.1-py3-none-any.whl (27 kB)
Collecting mathy-core<0.9.0,>=0.8.6 (from mathy)
  Using cached mathy_core-0.8.6-py3-none-any.whl (76 kB)
Collecting mathy-envs[gym]<0.12.0,>=0.11.4 (from mathy)
  Using cached mathy_envs-0.11.4-py3-none-any.whl (39 kB)
Collecting gym<0.21.0 (from mathy)
  Using cached gym-0.20.0.tar.gz (1.6 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
$

Could you please help me?

Thanks in advance!

Division not working properly

Division Tests:

mathy simplify "12 / 6"
✔ Solved! 12 / 6 = 2
initial-state(-1)         | 12 / 6
constant arithmetic(1)    | 2
mathy simplify "12x / 6x"
✘ Failed to find a solution :(

Is this outside the scope of the project?

Adding new mathematical methods to mathy

Hi Justin, I'am a bit confused about which file/files I have to modify, in order to add new methods like Differentiation, integration etc. Can you tell me which folder or file, I have to modify ?

Can you provide some code examples?

I want to achieve a small function, that is, the formula and equation can achieve step by step calculation.But I looked through the documentation and didn't see any code examples, so I didn't know where to start. I hope the author can provide some detailed examples, very grateful!

Error when installing the package

Hi, I seem to be getting this error in my terminal, when running the simplify command. I installed mathy via pip install.

C:\Users\Haaris\Documents\GitHub\mathy\libraries\mathy_python>mathy simplify "2x + 4 + 3x * 6"
C:\Users\Haaris\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\registration.py:216: UserWarning: WARN: Overriding environment mathy-goal-complex-easy-v0
  logger.warn("Overriding environment {}".format(id))
C:\Users\Haaris\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\registration.py:216: UserWarning: WARN: Overriding environment mathy-goal-complex-normal-v0
  logger.warn("Overriding environment {}".format(id))
C:\Users\Haaris\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\envs\registration.py:216: UserWarning: WARN: Overriding environment mathy-goal-complex-hard-v0
  logger.warn("Overriding environment {}".format(id))

Update API doc generation script to run with lint-staged

I noticed that I forgot to update the API docs for a refactor that moved mathy.mathy to mathy.api.

Currently, you have to run:

cd libraries/website
sh tools/docs.sh

And it generates all the API doc files. This means it's too slow to run all the time. It should be updated to run as part of lint-staged and support passing individual files on the command-line, similar to the iPython notebook script: https://github.com/justindujardin/mathy/blob/master/libraries/website/tools/write_ipynb.py#L39-L62

The lint-staged setup specifies wildcard matches for files to run a script on when they are changed and staged to be committed. See the iPython notebook setup again for an example: https://github.com/justindujardin/mathy/blob/master/package.json#L35-L38

Changes Required:

  • Update lint-staged inside the root package.json to run API doc generation on changed py files inside of libraries/mathy_python
  • Update libraries/website/tools/docs.[py|sh] to support passing filenames as arguments for lint-staged

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.