Week 4 Check-in

Published: 06/30/2020

What did you do this week?

I started a PR that adds multimethods for array manipulation routines. I'll name the multimethods according to the NumPy docs sectioning:

Basic operations

  • copyto

Changing number of dimensions

  • expand_dims
  • squeeze

Changing kind of array

  • asfarray
  • asfortranarray
  • asarray_chkfinite
  • require

Joining arrays

  • dstack

Splitting arrays

  • split
  • array_split
  • dsplit
  • hsplit
  • vsplit

As mentioned in my last blog post, this week I also started reviewing a PR that implements metaclasses from which classes in unumpy instantiate. They are used to override these classes with ones from the backend being used through a property method called overriden_class. Currently only the NumPy backend has this method but I've been trying to implement it in other backends as well.

What is coming up next?

The current PR should last one more week since I'll continue to add more multimethods for array manipulation routines. I will also be working on adding overriden_class to other backends as I've been doing this past week.

Did you get stuck anywhere?

I think the only place I got stuck was trying to implement overriden_class for other backends. To be more specific, I tried implementing it in the Dask backend first and foremost, however, this backend is different since it uses another backend internally. From my understanding this causes that some classes might have to be overridden by the inner backend and others by Dask itself. With that said, I might need help later on with this issue. In general, I feel that this metaclasses feature has been the most challenging part of my project so far. Although this wasn't initially included in my proposal and can be considered extra work I welcome the challenge and hope that my mentors keep entrusting me more of these features. Also, given that the semester is almost ending I start having more free time on my hands to tackle these problems which is what I want.