Comments (9)
Similar:
np.eye(N, M=None, k=0)
-->
np.identity(N)
-->
from latexify_py.
I will do this once i figure out CI/CD on my other PR.
Once NDArray support is done, we can do the same for np.transpose()
and np.inv()
etc. as well
from latexify_py.
What is the best place to check for function names for this issue? Should this be done in the function_expander.py
file following #132 or should it be checked in visit_Call
in function_codegen.py
following #118 ?
from latexify_py.
@Casper-Guo If you are planning to implement this on FunctionExpander
, function_expander_test.py
is the best place I think.
from latexify_py.
Sorry I didn’t meant checking as in writing test cases. I was asking where best to extract numpy function names and generate the appropriate Latex. The two linked PRs seem to do this in different files
We will have a PR ready for this within the week
Cc: @LakeBlair
from latexify_py.
@odashi I just created a pull request for this feature. I wasn't too sure the best place to implement this feature so I added them to visit_call() in function_codegen.py. Could you review?
from latexify_py.
@LakeBlair I checked it now. Overall it looks great, but it also requires some refactoring to support complete syntax and error handling. If you are okay, I will fix remaining things on behalf of you.
from latexify_py.
@odashi I added a generalization for np.zeros function, please check my most recent commit. Additionally, for your second bullet point
I think these processes don't work if the subtree has unexpected syntax. It usually happens when users gave other functions with the same name. As the AST varies, we basically need complete check of the underlying structure of the given subtree.
I‘d love to implement a complete check for the subtree structure. Do you know in which file(s) I can find a similar example for such implementation?
from latexify_py.
Okay, let's move onto the pull request to continue the discussion.
from latexify_py.
Related Issues (20)
- Custom multiplication behavior (option to use \cdot everywhere) HOT 1
- Should `def(x): func(x)` generate `\func x` or `\func \mathopen{}\left( x \mathclose{}\right)`? HOT 2
- Fine-grained control over function name replacements
- Designing "plugin" interface HOT 3
- Use `latex.py` for to standardize codegen HOT 2
- Feedback From a User HOT 14
- Please add support for Python >3.11 HOT 2
- IPython extension to automatically use conversions on displayed objects HOT 1
- Better Identifier For Multi Index and RHS HOT 4
- Can you sub in values for show work? HOT 1
- Сonverting expressions or strings to latex format HOT 5
- Release New Version HOT 6
- Support for sqrt-like nth-roots when rendering x**(1/p)? HOT 2
- Support for log1p and expm1? HOT 4
- `if-elif` statements break if there's no `else` HOT 1
- Typo in \mathopen HOT 3
- Counterintuitive (wrong?) parenthesis when combining exp() and powers HOT 16
- Function docstring and reduce_assignments enabled does not play nice HOT 2
- Include .tex output examples in latexify_py/examples/examples.ipynb HOT 3
- math.pow not working properly on google colab HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latexify_py.