[SciPy-Dev] GSOC 2018 [Proposal Feedback]

Hameer Abbasi einstein.edison at gmail.com
Wed Mar 21 06:48:51 EDT 2018


Overloaded operators can be found here:
https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types

It was deprecated because things taking it as input expected * to work like
in np.ndarray and there were other weird incompatibilities when using it in
a lot of other functions (e.g. always 2-D)

Yes, __matmul__ translates to the @ operator. New users can find it
complicated but most, if not all, Numpy/Scipy users know by now to use @ or
np.dot (unfortunately, there's no way to override np.dot yet AFAIK).

__rmatmul__ is for when you do (for example) np.ndarray @ yourclass. In
this case, np.ndarray.__matmul__ returns NotImplemented, and then the
operator falls back to your __rmatmul__ method.


On Wed, Mar 21, 2018 at 11:35 AM, Aditya Bharti <adibhar97 at gmail.com> wrote:

> Hi Hameer,
> Thank you for your comments. They were quite informative. Just a couple of
> questions.
>
> The __matmul__ function translates to the @ operator correct? Would that
> not be somewhat awkward for new users?
> Also, I couldn't find the suggested __rmatmul__ anywhere on the operator
> list: https://docs.python.org/3/library/operator.html. Am I looking in
> the wrong place?
>
> In addition, are there any other specific things I need to stay away from
> to avoid np.matrix like problems? I just know that the matrix class is not
> used much, I don't really know the reasons for its deprecation.
>
> Thanks,
> Aditya
>
> On 21 March 2018 at 15:52, Hameer Abbasi <einstein.edison at gmail.com>
> wrote:
>
>> Hi Aditya,
>>
>> I've left a few comments regarding composing and np.matrix. Using __mul__
>> for anything other than real multiplication is ill-advised and caused
>> problems before with np.matrix. I suggest you use __matmul__ instead.
>>
>> Hameer
>>
>>
>> On Wed, Mar 21, 2018 at 9:40 AM, Aditya Bharti <adibhar97 at gmail.com>
>> wrote:
>>
>>> Hi all,
>>> Thank you for your helpful comments. I've updated my proposal with the
>>> following major changes:
>>>
>>>    - Fleshed out the API in more detail
>>>    - Included a github link to a sample implementation of the
>>>    initializer functions
>>>    - Proposed a quaternion class for faster compositions of rotations
>>>    (use of this class will be completely optional and not required for
>>>    Rotation() functionality)
>>>
>>> Thank you for all your help so far. I look forward to hearing from you.
>>>
>>> Regards,
>>> Aditya
>>>
>>> https://docs.google.com/document/d/1UriyLABwgjUcYfBofSr4hqAn
>>> LzblJ71pkzm7i26O8ws/edit?usp=sharing
>>>
>>> On 21 March 2018 at 01:01, Eric Larson <larson.eric.d at gmail.com> wrote:
>>>
>>>> I second Ralf's comments, and have added a few, too.
>>>>
>>>> Eric
>>>>
>>>>
>>>> On Tue, Mar 20, 2018 at 11:56 AM, Ralf Gommers <ralf.gommers at gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Mar 19, 2018 at 1:05 PM, Aditya Bharti <adibhar97 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Goal of this email: To ask for feedback on the draft proposal for
>>>>>> GSOC 2018
>>>>>>
>>>>>> I am an undergraduate researcher in Computer Vision interested in
>>>>>> contributing to scipy's Rotation Formalism in 3 Dimensions project idea as
>>>>>> part of GSOC 2018.
>>>>>>
>>>>>> I've made some contributions to scipy and have drafted a proposal
>>>>>> here
>>>>>> <https://docs.google.com/document/d/1UriyLABwgjUcYfBofSr4hqAnLzblJ71pkzm7i26O8ws/edit?usp=sharing>.
>>>>>> [1]
>>>>>>
>>>>>> It includes my contact information, code samples, project timeline,
>>>>>> and an introduction about myself. I went through the proposal guidelines on
>>>>>> the website and think I covered all my bases.
>>>>>>
>>>>>> I would greatly appreciate your feedback on this as it will help me
>>>>>> in making a strong application.
>>>>>>
>>>>>
>>>>> Hi Aditya, that looks like a solid start. I added a few comments; will
>>>>> leave it to the proposed mentors to comment on some of the algorithmic
>>>>> ideas. One other thing to consider is existing implementations to possibly
>>>>> build upon - a couple of people suggested other packages on this list not
>>>>> too long ago.
>>>>>
>>>>> Cheers,
>>>>> Ralf
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Thank you,
>>>>>> Aditya Bharti
>>>>>>
>>>>>> [1]: https://docs.google.com/document/d/1UriyLABwgjUcYfBofSr4hqAn
>>>>>> LzblJ71pkzm7i26O8ws/edit?usp=sharing
>>>>>>
>>>>>> _______________________________________________
>>>>>> SciPy-Dev mailing list
>>>>>> SciPy-Dev at python.org
>>>>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> SciPy-Dev mailing list
>>>>> SciPy-Dev at python.org
>>>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> SciPy-Dev mailing list
>>>> SciPy-Dev at python.org
>>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> SciPy-Dev mailing list
>>> SciPy-Dev at python.org
>>> https://mail.python.org/mailman/listinfo/scipy-dev
>>>
>>>
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at python.org
>> https://mail.python.org/mailman/listinfo/scipy-dev
>>
>>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180321/9571b2b5/attachment.html>


More information about the SciPy-Dev mailing list