What did you do this week?
This week I started a PR that further adds multimethods for array creation routines. I'll name the additions according to the NumPy docs sectioning:
Ones and zeros:
identity
ones_like
zeros_like
full_like
From existing data:
asanyarray
ascontiguousarray
copy
frombuffer
fromfile
fromfunction
fromiter
fromstring
loadtxt
During this week I also started learning about metaclasses in Python. This was encouraged by my mentors as a way to level up my Python skills so that I can tackle more complicated features in unumpy. This was mostly done by reading documentation, posts and articles about the subject and watching one of my mentors code some examples.
What is coming up next?
The current PR will be stretched to this upcoming week where I'll be covering more multimethods for these routines. Also, as briefly discussed in my previous blog post, I will eventually be picking up a PR that adds multimethods for the random
module. However, as stated in this issue, classes in unumpy like np.random.RandomState
could benefit from a custom metaclass. Given the importance of this feature for current and future implementations additional work during this week will be focused on the creation of this metaclass.
Did you get stuck anywhere?
There were some difficulties writing tests for some of these routines as there were a lot of errors that I didn't understand at first. Going over each one separately and writing why I thought they were failing actually helped in fixing some of them. At the time of writing this they are almost all resolved with only one exception.