Articles on tirthasheshpatel's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on tirthasheshpatel's BlogenSun, 22 Aug 2021 15:46:49 +0000Final Week: PR Merged 🎉https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/final-week-pr-merged/<h2>What did you do this week?</h2> <p> This was the final week for GSoC and we (somehow) managed to get <a href="https://github.com/scipy/scipy/pull/14215">my PR</a> merged! It broke the Gitpod integration but it was immediately fixed afterwards in <a href="https://github.com/scipy/scipy/pull/14603">scipy#14603</a>. I also wrote and submitted <a href="https://gdoc.pub/doc/e/2PACX-1vRNGnoX3bqNb81bcjsKsn3p5pxGRqjM0E4LM67hvfeBqG6KMdbR-3CNdb1k631pXZ4yrCq1bzwXj8XK">my final report</a> as my final evaluation. </p> <p> As per my proposal, I was able to achieve all the listed milestones. Although I was able to add two new generators from UNU.RAN, there are a lot more which would be good to have in SciPy and would improve the performance significantly (e.g. <code>NumericalInversePolynomial</code> and <code>AutomaticRatioOfUniforms</code>). I have filed an issue <a href="https://github.com/scipy/scipy/issues/14600">scipy#14600</a> with a list of generators that can be added to SciPy over time. I am willing to continue the work on this project after GSoC and hopefully resolve the issue. I have started to work on adding <code>NumericalInversePolynomial</code> in <a href="https://github.com/scipy/scipy/pull/14619">scipy#14619</a> and already received some reviews from one of my mentors! I hope to add at least the most important generators before the 1.8.0 release. </p> <p> I am happy I got a chance to work on such an interesting project and was able to achieve my goals. As always, my mentors and many other developers supported the project and contributed their expertise to increase the quality of my work. The output was orders of magnitude better than what I initially proposed. Thanks to everyone involved in this project! </p>tirthasheshpatel@gmail.com (tirthasheshpatel)Sun, 22 Aug 2021 15:46:49 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/final-week-pr-merged/Week #10: Finishing up the PRhttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-10-finishing-up-the-pr/<h2>What did you do this week?</h2> <p>Last week I got stuck at some failures on Linux Python3.7-dbg (debug builds). I was able to replicate it locally and thankfully also found a fix for it. Turns out, I was accessing a Python attribute while a live exception was set in Python. This is not allowed because the Python objects of the class might have been destroyed or garbage collected and my attribute lookup might fail with a segmentation fault. This was caught by the debug build of Python 3.7 and was fairly simple to fix: just removed the offending line and the tests passed again! To ensure this doesn't happen again, I refactored some code to make more careful use of <code>PyErr_Occurred()</code>.</p> <p>There was also some discussion around what to name the seed parameter: the new Generator API favors something other than <code>random_state</code> which has been well-established in SciPy. As there was no consensus among what to name it - some favored consistency while others wanted to differ between the new and the old API - we decided to go with the plain old <code>random_state</code> and change its name in some other PR at all places in SciPy.</p> <h2>What is coming up next?</h2> Almost all the reviews have now been addressed, the CI is green, and I am happy with the current state of the PR. It seems like a good starting point and if things stay this way, we might merge by the end of this week. Once that's done, adding new methods is fairly straightforward. I will try to add as many methods as possible before the end of GSoC. <h2>Did you get stuck anywhere?</h2> No blockers this week.tirthasheshpatel@gmail.com (tirthasheshpatel)Sun, 15 Aug 2021 04:16:25 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-10-finishing-up-the-pr/Week #9: CI failure on Python3.7-dbghttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-9-ci-failure-on-python3-7-dbg/<h2>What did you do this week?</h2> I addressed more reviews this week and added pickling support to all the generators. Most of the changes focused on the documentation, tutorials, and the UI. We removed the <code>params</code> keyword (used to pass positional arguments to the passed callable) from the method constructor and had a discussion on renaming the <code>seed</code> parameter to something like <code>numpy_rng</code>. I also added some histogram plots to the docs and tutorials. Lastly, as all the generators are Cython extensions classes with a non-trivial <code>__cinit__</code> method, Cython was not able to generate code to pickle object automatically. Hence, I added a rudimentary <code>__reduce__</code> method which enables pickling support. Relevant tests have also been added. <h2>What is coming up next?</h2> We need to finalize renaming <code>seed</code> to something more apposite like <code>rng</code> or <code>numpy_rng</code>. All other blocking comments have been addressed, except a recent failure on CI. I will investigate the cause of the failure and try to resolve it by the end of this week. As the GSoC deadline is imminent, I hope to complete that by next week so we could merge the PR. <h2>Did you get stuck anywhere?</h2> I noticed a <a href="https://github.com/scipy/scipy/runs/3273674972">few failures</a> on the linux workflows on Python3.7-dbg build. For some reason, Python crashes when TransformedDensityRejection is called with a invalid PDF. It seems like there is some internal logic error in the C/Cython code. As this is not a Python error with a proper traceback, it makes it very difficult to even locate the error, let alone solving it! I am thankfully able to replicate it locally and hope to figure out the failures as soon as possible.tirthasheshpatel@gmail.com (tirthasheshpatel)Mon, 09 Aug 2021 11:47:22 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-9-ci-failure-on-python3-7-dbg/Week #8: Addressing Reviewshttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-8-addressing-reviews/<h2>What did you do this week?</h2> Sorry, I am late publishing this blog! I will resume my regular schedule next week. I spent this week addressing the reviews on my PR. There were comments on the documentation suite and tutorials on formatting issues, obscure phrasing, and naming conventions. As we are getting near the deadline, we decided to leave larger enhancements to docs and tutorials to a follow-up PR. Only a few comments are left to be addressed which I hope to complete by the next week. Also, Nicholas reviewed the C/Cython code again and approved those changes. <h2>What is coming up next?</h2> As GSoC deadline is approaching, we have also decided to try and merge the PR early in the week of August 8 so that more UNU.RAN methods can be added in these last few weeks of the program. I also want to clean up the C/Cython code and go through the docs and tests again to resolve typos and grammatical errors, if any. There are two approvals on the PR already so, hopefully, we could achieve this deadline. <h2>Did you get stuck anywhere?</h2> No.tirthasheshpatel@gmail.com (tirthasheshpatel)Thu, 05 Aug 2021 01:49:51 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-8-addressing-reviews/Week #7: More Reviews on my PRhttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-7-more-reviews-on-my-pr/<h2>What did you do this week?</h2> I got a few more reviews on my PR last week. It engendered a interesting discussion on the level of detail we should add in the tutorials. There a few subtle concepts that need to be elucidated for general users to adopt the new API easily. Christoph committed a draft with new description to help explain those concepts better. There also also some other discussions on what to name of the method to sample random numbers from and how to point the users to the new Generator API. As I have an exam coming up next week (details in next section), I was a little quite this week. <h2>What is comping up next?</h2> I will be addressing the reviews on my PR. I also want to benchmark some methods to sample from discrete distribution sometime later. I have my <a href="https://www.ets.org/gre">GRE</a> examinations next week on 2'nd August (Monday) so this week might be more silence from my side :) But I will resume my regular schedule right after the exam. <h2>Did you get stuck anywhere?</h2> No.tirthasheshpatel@gmail.com (tirthasheshpatel)Mon, 26 Jul 2021 11:25:35 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-7-more-reviews-on-my-pr/Week #6: More Benchmarkshttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-6-more-benchmarks/<h2>What did you do this week?</h2> I continued writing benchmarks for UNU.RAN methods to sample from continuous distributions. The results of these benchmarks are quite promising. They outperform the default <code>rvs</code> method in SciPy on an average by 100x better performance. In some cases, when the PDF/CDF are expensive to evaluate, UNU.RAN methods are 10000 times faster than the default rvs method. It would a nice future project to add a specialized rvs methods for some distributions where UNU.RAN performs significantly better than SciPy. For more details and some pretty plots, please look at <a href="https://github.com/tirthasheshpatel/scipy/pull/10">tirthasheshpatel#10</a>. With the help of Ralf Gommers, UNU.RAN submodule got transfered under the SciPy organization this week. The new submodule is now present at <a href="https://github.com/scipy/unuran">scipy/unuran</a>. <h2>What is coming up next?</h2> I am hoping to get some reviews on my PR over the period of next week. Other than that, I don't have anything specific to do this week. I will maybe benchmark UNU.RAN method to sample from discrete distributions... <h2>Did you get stuck anywhere?</h2> Nope. Thankfully, another smooth week.tirthasheshpatel@gmail.com (tirthasheshpatel)Sun, 18 Jul 2021 12:31:03 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-6-more-benchmarks/Week #5: First Phase Ends...https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-5-first-phase-ends/<h2>What did you do this week?</h2> The PR resolving the memory leaks is still up for reviews. While it was being reviewed, I thought it would be nice to think ahead of time and look at the potential performance of the methods I propose to add. So, I created a new branch <a href="https://github.com/tirthasheshpatel/scipy/tree/gsoc-unuran-bench"><code>gsoc-unuran-bench</code></a> on my fork and started wrapping the remaining methods I had proposed in the excel sheet that I wrote a couple of weeks ago. I then wrote a <a href="https://github.com/tirthasheshpatel/scipy/blob/gsoc-unuran-bench/unuran_perf.py">small Python script</a> to benchmark all the wrapped methods against NumPy random number generators. For now, I have only used two distributions: Standard Normal and Beta(2, 3). I plan to add more in the following weeks. Sampling was run 3 times per measurement. The results of the benchmark: <ul> <li>UNU.RAN's methods (namely <code>NumericalInversePolynomial</code> and <code>AutomaticRatioOfUniforms</code>) were 3x faster than the NumPy RNG for the Beta(2, 3) distribution.</li> <li>NumPy RNG was slightly faster than UNU.RAN's methods (with <code>NumericalInversePolynomial</code> and <code>AutomaticRatioOfUniforms</code> being the closest to the performance of the NumPy RNG) to sample from the Standard Normal distribution.</li> </ul> It is good to see that there is a possibility of improving the performance of sampling from some distributions once the methods from UNU.RAN are integrated in SciPy. <h2>What is coming up next?</h2> There are already some reviews on the PR resolving memory leaks and I hope by the end of the next week, there would be even more and we could decide whether we want to use that approach in SciPy. It's a tricky and non-conventional approach so I am not sure how many reviews would be considered "enough" or how much time will it take for the maintainers to properly review it. But while that is going on, I hope to start wrapping methods to sample from discrete distributions and benchmark them against the NumPy RNG. <h2>Did you get stuck anywhere?</h2> No. This was more or less a smooth week... <h2>Marking the end of Phase 1</h2> GSoC page says that the first phase reviews would start from tomorrow. So, this seems like a good time to summarize all the progress of Phase 1 here: <ul> <li>PR filed: Tests pass.</li> <li>SciPy builds with UNU.RAN.</li> <li>Separated UNU.RAN in its own submodule.</li> <li>Create wrappers for one continuous and one discrete generator.</li> <li>Basic benchmarks written.</li> <li>Basic tests written.</li> <li>A strong documentation suite and tutorials written.</li> <li>Extra benchmarks written on my fork for all continuous methods in UNU.RAN.</li> </ul> According to my proposal, I have successfully achieved my first and second milestone and encroached the third milestone ahead of time! Most of the points above are still under reviews and might be changed in the future if need be. It would still be a challenge, both for the maintainers and me, to resolve the memory leaks issue but I hope that is done before the end of the second phase so that we can merge and test out some of the new functionality and iterate on the design. Let's hope the best for what's coming!tirthasheshpatel@gmail.com (tirthasheshpatel)Mon, 12 Jul 2021 04:31:17 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-5-first-phase-ends/Week #4: Memory Leaks :(https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-4-memory-leaks/<h2>What did you do this week?</h2> <p>This week was, by far, the <i>most</i> challenging week for me! Turns out, resolving the memory leaks issue is not as simple as patching UNU.RAN and changing the order of frees and calls to the error handler :/ I was able to discover this because of a very helpful suggestion by Nicholas (one of my mentors) to run <code>valgrind</code> on my changes (see the discussion on <a href="https://github.com/tirthasheshpatel/unuran/pull/1">tirthasheshpatel/unuran#1</a>).</p> <pre>==25301== LEAK SUMMARY: ==25301== definitely lost: 13,728 bytes in 58 blocks ==25301== indirectly lost: 43,520 bytes in 387 blocks ==25301== possibly lost: 166,439 bytes in 114 blocks ==25301== still reachable: 3,553,979 bytes in 2,254 blocks ==25301== suppressed: 0 bytes in 0 blocks </pre> <p>These memory leaks occur due to the non-local returns in the thunk and in the error handler. Unfortunately, this behavior is ingrained in the way I have designed the API to handle errors and a major refactor is required to fix the issue! <a href="https://github.com/tirthasheshpatel/scipy/pull/9">tirthasheshpatel/scipy#9</a> is my first (and hopefully last) attempt aimed at doing this. It refactors the Cython wrapper to use the <code>MessageStream</code> API to handle the errors occurring in UNU.RAN and <code>PyErr_Occurred()</code> to detect the errors occurring in Python callbacks.</p> <p>The MessageStream API was introduced and written by Pauli Virtanen (@pv on GitHub) while writing wrappers for Qhull. <code>MessageStream</code> uses <code>FILE *</code> streams to log errors occurring in the C API to a temporary file (either in memory or on disk depending on whether <code>open_memstream</code> is available). Once the execution of the C function is complete, one can check the file for errors and raise them in Python. One of the downsides of this approach is that UNU.RAN contains a global <code>FILE *</code> variable which is not thread-safe. Hence, thread-safety needs to be provided in the Cython wrapper itself which further complicates things. I have used a module-level lock which is acquired every time before calling the <code>unur_set_stream</code> function (which is responsible for changing the global <code>FILE *</code> variable) and is released once the required set of C functions have been evaluated. Finally, <code>valgrind</code> seems to be happy with this and reports no memory leaks!</p> <pre>==44175== LEAK SUMMARY: ==44175== definitely lost: 1,128 bytes in 11 blocks ==44175== indirectly lost: 0 bytes in 0 blocks ==44175== possibly lost: 195,264 bytes in 124 blocks ==44175== still reachable: 3,258,070 bytes in 2,112 blocks ==44175== suppressed: 0 bytes in 0 blocks </pre> <p>(The <code>1128</code> lost bytes are inside <code>dlopen.c</code> library and not UNU.RAN wrappers.)</p> <p>A very similar thing has been done by Pauli Virtanen in Qhull and getting his help and reviews on <a href="https://github.com/tirthasheshpatel/scipy/pull/9">tirthasheshpatel/scipy#9</a> would be invaluable! I hope that my approach is correct this time and the whole fuss about memory leaks resolves as soon as possible.</p> <h2>What is coming up next?</h2> The issue I delineate in the previous section is the bottleneck blocking <a href="https://github.com/scipy/scipy/pull/14215">#14215</a> from receiving more reviews and merging. I hope to continue my work on <a href="https://github.com/tirthasheshpatel/scipy/pull/9">tirthasheshpatel/scipy#9</a> and get it approved and/or merged by the end of this or next week. I also hope this doesn't bring more surprises down the line and I can continue my work on <a href="https://github.com/scipy/scipy/pull/14215">#14215</a> more smoothly! <h2>Did you get stuck anywhere?</h2> Not yet... :)tirthasheshpatel@gmail.com (tirthasheshpatel)Sun, 04 Jul 2021 19:31:42 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-4-memory-leaks/Week #3: Separating UNU.RAN in its own submodulehttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-3-separating-unu-ran-in-its-own-submodule/<h2>What did you do this week?</h2> This week went by addressing last week's blockers and bifurcating UNU.RAN in its own submodule. I put the UNU.RAN source code in my PR which made that patch size over 100,000 LOC making it very difficult to review. So, I spent a couple of days creating a <a href="https://github.com/tirthasheshpatel/unuran">separate repository</a> for the UNU.RAN source code and using <code>git submodule</code> to clone it into SciPy. I also wrote a Python script to download and clean UNU.RAN for use in SciPy. This reduced the size of the patch from over 100,000 LOC to only about 4000 LOC. There were also some comments on the tutorial and benchmarks which I addressed this week. <h2>What is coming up next?</h2> Last week, I also noticed a memory leak so I decided to write a Python script to find more. The script reports 40 to 50 memory leaks throughout the source code but the part of the source code used by SciPy has only about 9 to 10 memory leaks. In the last meeting, we came up with two potential ways to get rid of them: (i) patch up UNU.RAN and reverse the order of frees and error, (ii) Instead of jumping out of the C function, use the return code of UNU.RAN functions to set and raise the error. The problem with approach (ii) is that some functions don't return an error code. So, I plan to test the first approach out this week and hopefully address all the memory leaks. We also decided to try out writing a higher-level API for the String API and get other devs opinions on it on the mailing list. <h2>Did you get stuck anywhere?</h2> No blockers this week!tirthasheshpatel@gmail.com (tirthasheshpatel)Sun, 27 Jun 2021 05:11:40 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-3-separating-unu-ran-in-its-own-submodule/Week #2: Working on the PRhttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-2-working-on-the-pr/<h2>What did you do this week?</h2> This week was spent mostly polishing my pull request and addressing reviews. I got a few big things out of the way though. Firstly, I refactored the API to accept a single <code>dist</code> object containing all the required methods. Secondly, I wrote a tutorial to document the usage of the new API. And lastly, I wrote a benchmark suite to profile the setup and sampling stage of each sampler. Moreover, using a lot of help from Bas (@BvB93 on GitHub), I was able to resolve all the MyPy static typing errors and get the MyPy check passing. While adding tests for the <code>seed</code> parameter, I noticed that I had made a mistake in handling the old NumPy <code>RandomState</code> API. As I had used global variables to sample from the NumPy RNG, seeding a generator broke! This was because the underlying (global) NumPy RNG was overridden by a new RNG as soon as a new generator with a seed was created. Thankfully, I quickly found a way to avoid the use of global variables and tests started passing again. One of my mentors, Christoph, was interested in using the UNU.RAN's test suite to write strong tests in SciPy. I have started looking into its test suite and also ported a few tests but this is still a work in progress. <h2>What is coming up next?</h2> I have got a lot of work done on the PR and it's shaping nicely: Main components of the PR have been written; Most tests pass. With this, I hope to mark the PR as open for reviews soon. I will have to make sure that I have added sufficient tests and documentation. Also, the new code lacks comments which may give reviewers a difficult time. I aim to clean out the newly added code and write more comments to delineate certain parts that might be tricky to understand. I also need to clean up the license file. There was also interest in separating UNU.RAN in a submodule. I hope to address some of these points in the upcoming week. <h2>Did you get stuck anywhere?</h2> I faced a weird 32-bit Linux failure which was related to my changes. When the <code>randint</code> distribution is input to the DAU method, it fails with an "unknown error" in UNU.RAN. I was able to localize the error but failed to find a reason for the failure. I suspect floating-point errors but a deeper inspection needs to be done. For the time being, as this isn't inside SciPy (and also only exists on a very specific platform and an old NumPy version), I have skipped that test case. This also led to a squalid revelation: memory leaks :/ This is turning into more of a can of worms than I had initially expected. Sometimes UNU.RAN frees allocated memory <i>after</i> calling the error handler. But the error handler is designed to jump out of the C code and return to the Cython code where the error can be raised safely. But, then, the allocated memory is never freed leading to a memory leak. I am not sure how often this happens. But it might be something to investigate in more depth. I will see if this is substantial and look into what can be done.tirthasheshpatel@gmail.com (tirthasheshpatel)Sun, 20 Jun 2021 11:05:08 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-2-working-on-the-pr/Week #1: Creating a (big) PRhttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-1-creating-a-big-pr/<h2>What did you do this week?</h2> This week I submitted an overview of the progress on the mailing list (<a href="https://mail.python.org/pipermail/scipy-dev/2021-June/024878.html">here</a>) and created a pull request on SciPy (<a href="https://github.com/scipy/scipy/pull/14215">#14215</a>). Thankfully, all the tests pass and SciPy builds with UNU.RAN on all the required platforms! I also created some <a href="https://drive.google.com/file/d/1TH70SSvvc5eF6-YmDO8kFNvLqKaGROW-/view?usp=sharing">flowcharts</a> to elucidate the design of the internal API and manifest how callbacks are acquired and released. I also tried to write a higher-level API (<a href="https://github.com/tirthasheshpatel/scipy/pull/8">tirthasheshpatel/scipy#8</a>) as suggested by one of my mentors. <h2>What is coming up next?</h2> We have discussed quite a lot of points to keep me busy for a couple of weeks down the line :). Here it is: <ul> <li>Generate/build UNU.RAN tests and try integrating into SciPy test suite.</li> <li>Maybe figure out a way to speed up the performance on NumPy &lt; 1.19.</li> <li>Write better/stronger tests.</li> <li>Mock up API that uses same object interface i.e. bundle all functions together in a <code>dist</code> parameter.</li> <li>Address code reviews on my PR.</li> <li>Add relation [of the UNU.RAN API] to the <code>rv_discrete</code> and <code>rv_continuous</code> classes in tutorial. Add in docs that <code>rvs</code> of UNU.RAN methods and SciPy distributions differ.</li> </ul> <h2>Did you get stuck anywhere?</h2> No blockers this week!tirthasheshpatel@gmail.com (tirthasheshpatel)Sat, 12 Jun 2021 19:58:20 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-1-creating-a-big-pr/Week #0: Polishing the Prototypehttps://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-0-polishing-the-prototype/<h2>A little introduction</h2> Hello everyone! I am Tirth, a last year computer science undergraduate student at Nirma University in India. I have been using NumPy and SciPy since I started doing scientific computing in my first year of college. I have been contributing to SciPy since last year and hope to continue to do so :). I will we working this summer to integrate UNU.RAN library in the <code>scipy.stats</code> submodule. UNU.RAN is a C library for Universal Non-Uniform RANdom number generation. It has been used in the ROOT project by CERN and R bindings for the library (<code>Runuran</code>) have also been created. My goal would be to integrate methods for sampling from univariate continuous and discrete distributions. <h2>What did you do this week?</h2> I got to know my mentors, Christoph and Nicholas, in the first week of the community bonding period. Since then, we have been meeting regularly to discuss the API and have been exchanging a lot of design ideas. Over the span of last three weeks, I have been able to significantly enhance my prototype to the point where I feel confident enough to propose a PR on SciPy. I started out with <a href="https://github.com/tirthasheshpatel/scipy/pull/5">tirthasheshpatel/scipy#5</a> on my fork which was thread-unsafe and made my way up to <a href="https://github.com/tirthasheshpatel/scipy/pull/6">tirthasheshpatel/scipy#6</a> which seems in a very good shape. It builds with UNU.RAN on all the required platforms and tests pass with an exception of a flaky failure. During the last week, I have created <a href="https://docs.google.com/spreadsheets/d/1r36HypXwpit7sHt9YAe3K7yPL7HNNuQjTkbVYQIJ4xI/edit?usp=sharing">this excel sheet</a> with some information on the methods I propose to add in SciPy. It also contains the information about the methods to add and parameters to keep, etc. It will help me with coding those methods in the coming weeks and also document the decisions properly. <h2>What is coming up next?</h2> As the PR on my fork builds and tests pass, I hope to create a PR on SciPy by next week. I also aim to circulate a mail in the Mailing List regarding the imminent PR and try to get feedback from other devs on the design of the API. Nevertheless, the coming weeks are critical to the work I aim to finish during GSoC so I hope to get things done without much contention! <h2>Did you get stuck anywhere?</h2> There have not been any serious blockers during the community bonding period but the Windows CI failed due to some unrelated Pythran errors. After a few abortive attempts to resolve them, the discussion on <a href="https://github.com/scipy/scipy/issues/13717">#13717</a> helped me fix the failing builds. As pointed out in <a href="https://github.com/scipy/scipy/issues/13717#issuecomment-852388251">this comment</a>, I was missing LLVM and MinGW binaries in the <code>PATH</code> which caused some weird linking problems for 64-bit builds. It was moment of relief to see builds passing on windows, since windows failures worried me the most. Hopefully, everything passes on the SciPy PR that I aim to create by the end of this week :). Fingers crossed!tirthasheshpatel@gmail.com (tirthasheshpatel)Mon, 07 Jun 2021 21:06:36 +0000https://blogs.python-gsoc.org/en/tirthasheshpatels-blog/week-0-polishing-the-prototype/