Articles on NamamiShanker's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on NamamiShanker's BlogenFri, 09 Sep 2022 13:22:32 +0000Week 12: Successfully compiling SciPy with the new F2PY frontendhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-12-successfully-compiling-scipy-with-the-new-f2py-frontend/<h2>The new F2PY frontend compiles SciPy successfully</h2> <p>This last week of my GSoC journey was mainly fucussed on making F2PY production ready. And for any change in F2PY, it is important that the change doesn't break <a href="https://github.com/scipy/scipy/">SciPy</a>. For the last 2 weeks I have been trying to build SciPy but was being constantly bombarded by edge cases and compilation errors. Finally this week, after a few changes to my frontend parser, SciPy compiled successfully and all the tests passed successfully except for one test case. You can have a look at my <a href="https://github.com/numpy/numpy/pull/22225">Pull request here</a> with all the changes. I'll go into details of compilation and testing method below:-</p> <h3>Building SciPy for testing F2PY changes</h3> <p>If you go through <a href="https://github.com/scipy/scipy/blob/main/INSTALL.rst.txt">installation instructions for SciPy</a> it suggests that you build and install SciPy with its <a href="https://github.com/scipy/scipy/blob/main/setup.py">setup.py</a> file. However, that was misleading in my case. The setup.py file actually uses F2PY APIs, bypassing the frontend entirely. Since my frontend was not even being called, my changes weren't being tested and for a week I was under the false impression that my humungous changes consisting of 1600 lines of code were working perfectly. Alas, I late relised my misconception and resorted to other methods of building SciPy which would rely on the new frontend.</p> <p>Enter - <a href="https://github.com/scipy/scipy/blob/main/dev.py">scipy/dev.py</a>. dev.py scipt was added in effort to move away from to-be-deprecated distutils and building SciPy with Meson instead. I noticed that this script called F2PY through the command line which would be handled by my new frontend. I tried to build and test SciPy with this scipt using the command</p> <pre><code class="language-bash">python dev.py test</code></pre> <p>Obviously the first attempt wasn't successful. The first problem I encountered was that the <a href="https://github.com/scipy/scipy/blob/main/tools/generate_f2pymod.py#L280">subprocess command</a> <span style="">dev.py </span>was not comprehensible by <span style="">argparse </span>frontend. Let me explain why:</p> <pre><code class="language-python">f2py filename.pyf --build-dir ./ # This is incorrect as the positional argument "filename.pyf" is present before the flags/optional arguments f2py --build-dir ./ filename.pyf # This is correct. All the optional arguments/flags must be placed before positional arguments</code></pre> <p>This limitation is due to how the <span style="">argparse </span>works. Currently, I have edited the frontend parser such that it transfers all the filenames to the end. But this is a temporary fix, and we should change F2PY documentation so that it clearly mentions this requirement and changed examples should should reflect this requirement from the user side.</p> <p>There were a few bugs related to parsing module name from the pyf files but I won't go into unneccessary details here.</p> <h3>Results</h3> <p>F2PY now successfully build SciPy's fortran modules. All the test cases pass on my local machine except for one:- </p> <pre><code class="language-python">/home/namami2011/mambaforge/envs/scipy-dev/lib/python3.10/contextlib.py:79: in inner return func(*args, **kwds) E AssertionError: E Arrays are not almost equal to 5 decimals E E Mismatched elements: 1 / 9 (11.1%) E Max absolute difference: 1.77845359e-05 E Max relative difference: inf E x: array([[ 1.77845e-05, 1.13063e-05, -2.25008e-06], E [ 1.13025e-05, 7.33137e-06, -1.53296e-06], E [-2.24821e-06, -1.53482e-06, 3.44589e-07]]) E y: array([[0., 0., 0.], E [0., 0., 0.], E [0., 0., 0.]]) args = (&lt;function assert_array_almost_equal.&lt;locals&gt;.compare at 0x7f23cc887e20&gt;, array([[ 1.77845359e-05, 1.13062561e-05, -2...[-2.24821270e-06, -1.53481960e-06, 3.44589353e-07]]), array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]])) func = &lt;function assert_array_compare at 0x7f23e8b495a0&gt; kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 5 decimals', 'precision': 5, 'verbose': True} self = &lt;contextlib._GeneratorContextManager object at 0x7f23e8cbe5f0&gt; ================================================================================================== short test summary info =================================================================================================== FAILED scipy/linalg/tests/test_solvers.py::test_solve_discrete_are - AssertionError: ============================================================ 1 failed, 37188 passed, 2172 skipped, 12176 deselected, 133 xfailed, 13 xpassed in 559.92s (0:09:19) ============================================================</code></pre> <p>The failed testcase is a precision failure, probably due to the old processor on my machine. This testcase also fails using the latest numpy/main branch, so I don't think this error could be arising from my changes.</p> <p>All my work throughout GSoC has been pushed to my branch linked abpve. Please go through if you are interested and drop a comment if you have any ideas or would like to sugges any changes.</p> <h3>Did I get stuck anywhere?</h3> <p>I have pushed my changes to these two remote branches - <a href="https://github.com/numpy/numpy/pull/22225">Meson integration</a> and <a href="https://github.com/numpy/numpy/pull/21923">F2PY frontend changes</a>. All the testcases have passed except for 2 errors I am getting in the <a href="https://github.com/numpy/numpy/runs/8235702794?check_suite_focus=true">PR check tests</a>. I am lokking into these but probably these errors won't be resolved during the GSoC period as I need my mentor's help in resolving these. I will continue to look into this and resolve the issue.</p> <h3>What will i do next week?</h3> <p>The next week is my last GSoC week, and I have to make work report of my overall work done during this period. I'll probably be busy in that.</p>namami2011@gmail.com (NamamiShanker)Fri, 09 Sep 2022 13:22:32 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-12-successfully-compiling-scipy-with-the-new-f2py-frontend/Week 11: Debugging F2PY's parsing signature fileshttps://blogs.python-gsoc.org/en/namamishankers-blog/week-11-debugging-f2py-s-parsing-signature-files/<h2>Debugging F2PY's parsing signature files bug</h2> <h3>What did I do this week?</h3> <p>This week I encountered a bug while trying to build SciPy where F2PY was not parsing SciPy's signature files correctly. Without sounding too technical I want to write how I found the cause of the bug and implemented its fix:</p> <p>Encountering the bug: </p> <ul> <li>I tried to build and test SciPy with <a href="https://github.com/scipy/scipy/blob/main/dev.py">dev.py</a> using the command  <pre><code class="language-python">python dev.py test</code></pre> <p>This command builds SciPy from scratch using Meson and runs the tests. </p> <ul> <li> <p>Using setup.py file instead would have been of no use since it uses f2py2e APIs instead of using f2py directly from the command line which would expose our frontend. The f2py2e APIs are yet to be refactored to incorporate the new frontend.</p> </li> </ul> </li> <li> <p>The build was successful, but while testing I was constantly getting import errors from scipy/linalg/flapack_module. I inspected meson.build file on linalg level and to know <a href="https://github.com/scipy/scipy/blob/f48e1d2532aca1bcdb67b38d11be8356e6f446c3/scipy/linalg/meson.build#L74">the files</a> it was trying to build using F2PY.</p> </li> <li> <p>So the problem was while building <a href="https://github.com/scipy/scipy/blob/main/scipy/linalg/flapack.pyf.src">flapack.pyf.src</a>. I compared the postlists produced by my frontend and old f2py2e and <a href="https://www.diffchecker.com/jULHUNVN">the difference</a> was clear. </p> </li> </ul> <p>Cause of the bug:</p> <ul> <li>The above linked f2py signature file mentions module name in it. I was parsing this file and passing the module name without knowing this is already handled it is already handled in the backend.</li> <li>So F2PY was creating 2 modules with same name, but mine was produced empty because F2PY assumed my module is different from the module mentioned in the pyf file </li> </ul> <p>Fixing the bug:</p> <ul> <li>I referred to the <a href="https://github.com/numpy/numpy/blob/8b9b349e06d7ccb3c180632c79167f077c592223/numpy/f2py/f2py2e.py#L351-L362">logic in f2p2e</a> to name the produced modules and simply replaced mine with it. It fixed the bug and SciPy built and tested successfully.</li> </ul> <h3>Did I get stuck anywhere?</h3> <p>Yep, I am currently stuck trying to build NumPy. My changes when incorporated with NumPy v1.24.0 dev version produce a build which fails to import throwing the error:</p> <pre><code class="language-python">Original error was: /home/namami2011/mambaforge/envs/scipy-dev/lib/python3.10/site-packages/numpy/core/_multiarray_umath.cpython-310-x86_64-linux-gnu.so: undefined symbol: npy_sqrt </code></pre> <p>The problem is with distutils build system probably. I have to debug and add a fix for this.</p> <p>Interestingly, when my changes are added to NumPy version 1.23.2 the the build is produced correctly and Meson successfully builds SciPy with all the tests passing.</p> <h3>What will I do next week?</h3> <p>I will try to fix the above mention bug so that the latest NumPy version can build SciPy successfully. Then I will update my frontend PR and add a new PR for the new Meson backend.</p>namami2011@gmail.com (NamamiShanker)Wed, 31 Aug 2022 14:59:36 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-11-debugging-f2py-s-parsing-signature-files/Week 10: Testing the Meson Backend building systemhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-10-testing-the-meson-backend-building-system/<h2>Bulding SciPy with new F2PY's new Meson backend. </h2> <h3>What did I do this week?</h3> <p>I was busy this week and a lot on my plate other than GSoC. I couldn't do much this week, mostly spent trying to build SciPy using my version of F2PY.</p> <h3>What will I do the next week?</h3> <p>I will integrate --f77exec, --f90exec, --f77flags and --f90flags into meson building. These will be implemented through custom_targets options of Meson. Also I will test building SciPy with F2PY's Meson backend.</p>namami2011@gmail.com (NamamiShanker)Thu, 25 Aug 2022 16:16:08 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-10-testing-the-meson-backend-building-system/Week 9: Meson backend for F2PY is completed (Mostly)https://blogs.python-gsoc.org/en/namamishankers-blog/week-9-meson-backend-for-f2py-is-completed-mostly/<h2>Completing major part of Meson backend for F2PY</h2> <h3>What did I do this week?</h3> <p>As you know, F2PY provides compilation options to build the Python module for you. As distutils is being deprecated, F2PY is moving away from using NumPy's distutils for building shared libraries. Therefore, F2PY community had agreed to integrate Meson building option into F2PY. I am happy to say that most of the compilation options F2PY provides have been successfully integrated into Meson. I will release a bigger blog post explaining the changes that have taken place and the decisions made by me.</p> <h3>What will I do next week?</h3> <p>I will integrate --f77exec, --f90exec, --f77flags and --f90flags into meson building. These will be implemented through custom_targets options of Meson.</p> <h3>Did I get stuck anywhere?</h3> <p>No, all this was already planned months ago, I am not stuck anywhere.</p>namami2011@gmail.com (NamamiShanker)Tue, 16 Aug 2022 19:31:42 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-9-meson-backend-for-f2py-is-completed-mostly/Week 8: Meson backend for F2PYhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-8-meson-backend-for-f2py/<h2>Implementing backend compilation in F2PY in the form of a dependency injection</h2> <h3>What did I do this week?</h3> <p>I created a structure for dependency injection of backend compilation framework into F2PY for compiling Fortran sources and C wrapper. The work is still in prototype stage with support of most of features of F2PY. By the next week I aim to complete a working model for building of F2PY generated modules with Meson. However, I would still need to add support for Fortran 77 and Fortran 90 specific custom target building. If you are not able to understand all this jargon just wait for a few days I will release a fill blog post of the changes that have taken place.</p> <h3>What will I do next week?</h3> <p>I will implement remaining F2PY compile options in meson building module.</p> <h3>Did I get stuck anywhere?</h3> <p>No I didn't get stuck anywhere because all this was already planned way before in my first week of GSoC. Link to my complete article on how to fully handle F2PY's compilation options in Meson this here: <a href="https://namamishanker.github.io/posts/f2py-meson-backend/">https://namamishanker.github.io/posts/f2py-meson-backend/</a></p>namami2011@gmail.com (NamamiShanker)Fri, 12 Aug 2022 17:58:01 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-8-meson-backend-for-f2py/Week 6: Continuing working on the frontend argparsehttps://blogs.python-gsoc.org/en/namamishankers-blog/week-6-continuing-working-on-the-frontend-argparse/<h2>Continuing working on the frontend in the draft PR</h2> <h3>What did I do this week?</h3> <p>I implemented some changes suggested by reviewers on my <a href="https://github.com/numpy/numpy/pull/21923">draft PR</a>. </p> <p>Firstly, I added typing support to the functions I have made. Therefore, currently: <span style="font-family: Courier New,Courier,monospace;"><a href="https://github.com/numpy/numpy/pull/21923/files#diff-9cc1ac07b3ded5022ccd21f71268d0eb2036771b0b24add2d5719a47cf1935cf">f2pyarg.py</a>, <a href="https://github.com/numpy/numpy/pull/21923/files#diff-9b68cfdd8fa8a2756e396ffa1a39c809b4cd0f7828f8fcd6db5cc4b374b9b2a0">service.py</a>, <a href="https://github.com/numpy/numpy/pull/21923/files#diff-064743289fe051f64993e52c3b2d45ed9ef6381806edc0d17677d471f75e6fb3">utils.py</a> </span>have typing support. Initially I had added <span style="font-family: Courier New,Courier,monospace;">typing </span>library for type annotations. <a href="https://github.com/numpy/numpy/pull/21923#discussion_r914597755">But Bas Van Beek</a> suggested to replace them with <span style="font-family: Courier New,Courier,monospace;">buitlins </span>type annotations. These are not currently supported in Python versions below 3.9, but can be used by <span style="font-family: Courier New,Courier,monospace;">from __future__ import annotations</span> statement. The __future__ module is somewhat unique in that import therefrom enable behaviours that will only become default in future python versions. Older examples of this include the <code>print</code> functions and <code>with</code> statement, but a more recent addition is the postponed evaluation of annotations (<a href="https://peps.python.org/pep-0563/#abstract">PEP 563</a>), which implicitly stringifies all annotations during runtime (<em>e.g.</em> <code>a: int</code> automatically becomes <code>a: "int"</code>). </p> <p>However, for Any type annotation I would still need to rely on typing module. Also, the Optional type annotation can also be replaced by builtins by piping the type with None keyword. (e.g. arr: Optional[list] can be replaced by arr: list | None). The tests work fine with the changes and the frontend looks more complete. The mid evaluation starts from the next week and I would need to present the changes to writers of F2PY. I hope my work is ready.</p> <h3>What will I do next week?</h3> <p>I will fill out the mid evaluation form, and make changes according to the review.</p> <h3>Did I get stuck anywhere?</h3> <p>No, I mostly applied changes requested in the review. These were mostly clear requests with helpful reviewers who clarified any doubts I had.</p>namami2011@gmail.com (NamamiShanker)Wed, 27 Jul 2022 13:21:10 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-6-continuing-working-on-the-frontend-argparse/Week 5: The argparse F2PY is herehttps://blogs.python-gsoc.org/en/namamishankers-blog/week-5-the-argparse-f2py-is-here/<h2>Finishing with F2PY's new frontend</h2> <h3>What did I do this week?</h3> <p>I am so happy to say that I have completed a working and functioning <span style="font-family: Courier New,Courier,monospace;">argparse </span>frontend for F2PY. If you had read my last week's post, I had said that I still had to debug and implement a few changes for F2PY.</p> <p>Specifically:-</p> <p>1. F2PY's compilation tests were failing, because there were some bug in <span style="font-family: Courier New,Courier,monospace;">--f2cmap </span>flag.<br> 2. F2PY would not compile <span style="font-family: Courier New,Courier,monospace;">.pyf.src </span>files.<br> 3. I forgot to add version mentioning flag.</p> <p>I have fixed all the bugs and updated my one and only draft PR: <a href="https://github.com/numpy/numpy/pull/21923">https://github.com/numpy/numpy/pull/21923</a></p> <p>All the tests are working correctly and the new <span style="font-family: Courier New,Courier,monospace;">f2pyarg </span>should work exactly as <span style="font-family: Courier New,Courier,monospace;">f2py2e </span>used to work. Also I found a few bugs that I will report and add fix for. These bugs are:</p> <p>1. No test for verifying F2PY will work with <span style="font-family: Courier New,Courier,monospace;">.pyf.src </span>files.<br> 2. F2PY's <span style="font-family: Courier New,Courier,monospace;">test_kind </span>test fails on Max OSX M1 chip.</p> <p>Also, Rohit and I decided to drop one of our original goals. Before GSoC started we thought it would be a good idea to replace the current class based tests of F2PY to modern fixtures based tests. But we dropped it as the class based structure was performing very well, and the classes were responsible for compiling modules for testing.</p> <h3>What will I do next week?</h3> <p>I need to add some documentation changes and a release note for the changes have taken place. That's probably all I need to do for the next week, if another bug doesn't pop up.</p> <h3>Did I get stuck anywhere?</h3> <p>No, this week was comparatively a smooth sailing. I had already built the framework last week and, all I needed to do was to fix the bugs.</p>namami2011@gmail.com (NamamiShanker)Wed, 27 Jul 2022 12:38:25 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-5-the-argparse-f2py-is-here/Week 4: Continuing F2PY's frontendhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-4-continuing-f2py-s-frontend/<h2>Reimplemeting F2PY's frontend with `argparse`</h2> <h3>What did I do this week?</h3> <p>I continued with implementing F2PY's frontend with <span style="font-family: Courier New,Courier,monospace;">argparse</span> library. This week I implemented compilation functionality provided by F2PY in the frontend framework. I have written a detailed blog here: <a href="https://namamishanker.github.io/posts/argparse-f2py/">https://namamishanker.github.io/posts/argparse-f2py/</a>. </p> <p>It was much more difficult that we expected, mostly because of the fact that we needed to maintain backwards compatibility with numpy's distutils. The full integration is still on the way and should be completed by the mid of the next week.</p> <h3>What will I do the next week?</h3> <p>I will continue to implement compilation functionality in F2PY. The base work has been done this week, but I still need to debug and verify the working of <span style="font-family: Courier New,Courier,monospace;">argparse</span> F2PY. </p> <h3>Did I get stuck anywhere?</h3> <p>I'm glad you asked that. I did get stuck a lot this week. The way <span style="font-family: Courier New,Courier,monospace;">f2py2e</span> integrated with <span style="font-family: Courier New,Courier,monospace;">numpy.distutils</span> was a bit messy and much more complicated than I earlier expected. Please go through my linked blog if you are interested in the details. But then again, you probably aren't. Just know that it was a bit difficult.</p>namami2011@gmail.com (NamamiShanker)Wed, 27 Jul 2022 12:03:12 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-4-continuing-f2py-s-frontend/Week 3: Renovating F2PY's frontendhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-3-renovating-f2py-s-frontend/<h2>Reimplmenting F2PY's frontend with `argparse` library</h2> <h3>What did I do this week?</h3> <p>This week I worked on re-implementing `f2py2e's` <a href="https://github.com/numpy/numpy/blob/fa5bffc454fbafacfb3298ac30ea335635b54d07/numpy/f2py/f2py2e.py#L411">run_main()</a> function in with `argparse` library. The aim is to split up one big <a href="https://github.com/numpy/numpy/blob/main/numpy/f2py/f2py2e.py">f2py2e.py</a> into 2 files. One file `f2pyarg.py` is responsible for parsing arguments file while other `service.py` deals with f2py core functionalities.</p> <p>I have opened a draft PR here - <a href="https://github.com/numpy/numpy/pull/21923">https://github.com/numpy/numpy/pull/21923</a>. I will continue to add my frontend contributions to this branch.</p> <p>I have tried to be keep my distance from F2PY's core functionalities. These functions are convoluted with each other and a small change in one core functionality might break another.</p> <h3>What will I do next week?</h3> <p>Some upcoming goals are:- </p> <ul> <li>Implement <a href="https://github.com/numpy/numpy/blob/0f7eaf8971541e9f7e99c91b3a21e007f9d64c0c/numpy/f2py/f2py2e.py#L411">run_main()</a>. It is the function responsible for generating wrappers and <code>.pyf</code> files.</li> <li>Implement <a href="https://github.com/numpy/numpy/blob/0f7eaf8971541e9f7e99c91b3a21e007f9d64c0c/numpy/f2py/f2py2e.py#L505">run_compile()</a> responsible for compiling and building shared libraries.</li> <li>Decide and implement deprecation of flags. For ex. - `<code>--f2py-wrapper-output`</code>, `<code>--skip-empty-wrappers`</code></li> <li>Code cleanup. Will involve refactoring and deciding which flags belong to which subparser.</li> </ul> <h3>Did I get stuck anywhere?</h3> <p>It was difficult to integrate a new frontend to an existing and very old codebase. I kept getting stuck many times, but bebugged my way out of it. Currently some older tests are failing, but I think thats probably because of installation problems. Will look into it in the next meeting with my mentor Rogit Goswami.</p>namami2011@gmail.com (NamamiShanker)Wed, 06 Jul 2022 11:25:46 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-3-renovating-f2py-s-frontend/Week 2: A study of F2PY's backend build systemhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-2-a-study-of-f2py-s-backend-build-system/<h2>Week 2  <a href="https://namamishanker.github.io/posts/f2py-meson-backend/">Moving F2PY to Meson build system</a></h2> <h3>What did I do this week?</h3> <p>I did an extensive study on F2PY's build system functionality and what it would take to implement them in Meson. I wrote this extensive blog on <a href="https://namamishanker.github.io/posts/f2py-meson-backend/">Moving F2PY to Meson build system</a> providing details.</p> <p>I did not contribute any code this week as I was mostly studying Meson's documentation and finding f2py equivalent functionality.</p> <p> </p> <h3>What will I be doing next week?</h3> <p>I will start with implementing F2PY's frontend with `argparse` library.</p> <p> </p> <h3>Did I get stuck anywhere?</h3> <p>No, everything proceeds smoothly.</p> <p> </p>namami2011@gmail.com (NamamiShanker)Wed, 06 Jul 2022 11:14:19 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-2-a-study-of-f2py-s-backend-build-system/Week 1: A study of F2PY's frontendhttps://blogs.python-gsoc.org/en/namamishankers-blog/week-1-a-study-of-f2py-s-frontend/<h2>Community bonding period and Week 1</h2> <h3>What did I do this week?</h3> <p>During the community bonding period, I mostly scoured through the codebase, understanding F2PY's existing frontend, the on-going reimplementation of the frontend. I went through the existing tests and some of the tests that need to be added.</p> <p>This first week of GSoC I understood the backend compilation system and the new compilation method that will follow post addition of meson. I didn't write much code this week because I want to understand and structure out the changes need first. F2PY is a big tool and it need to be modernised in a lot of aspects. I think I will go in with a complete knowledge of what I am building towards.</p> <p>I have written a blog post on restructuring F2PY's frontend -  <a href="https://namamishanker.github.io/posts/f2py_frontend/">F2PY's frontend</a></p> <h4>What will I be doing the next week?</h4> <p>I will go through the rest of the flags in F2PY's frontend and find out Meson's equivalent functionality that we will use. I will create a full report of the same and upload it on my website's blog. Also, I will make pull request of the documentation and test changes I have proposed.</p> <h4>Did I get stuck somewhere?</h4> <p>No not really, my mentor Rohit Goswami is very available and helps me out a lot. We didn't get stuck anywhere this week.</p>namami2011@gmail.com (NamamiShanker)Mon, 20 Jun 2022 15:52:54 +0000https://blogs.python-gsoc.org/en/namamishankers-blog/week-1-a-study-of-f2py-s-frontend/