On Mon, Jun 26, 2023 at 6:57 AM Kai Striega <kaistri...@gmail.com> wrote:

> Hi Stefan,
>
> I'm interested in going that direction, or rather, getting the functions
> out of NumPy. I'm not sure if it's feasible to rip these functions out of
> NumPy itself – or how much work it would require. Last week I spent some
> time looking through the C source code (datetime_busday.{c,h} and
> datetime_busdaycal.{c,h}). I think it would require some effort to get it
> out as it depends on other functions which I'm not sure are part of the
> NumPy C-API.
>

I think these functions never really fit well into NumPy, and I'd like to
see them go. I don't think the large amount of work to turn numpy-financial
into a package containing C code and exposing the functionality there is
justified. I think Pandas is a much better place for this, and it already
has what looks like a superset of functionality:
https://pandas.pydata.org/docs/user_guide/timeseries.html?highlight=business#custom-business-days
.

>From a quick glance, Pandas only relies on `numpy.busdaycalendar` and
nothing else. So it'd be useful to investigate what it would take to move
that function to Pandas, and then deprecate everything related to business
days in NumPy.

Cheers,
Ralf



>
> Having someone familiar with the C-API as a guide would make me feel much
> better about working on it.
>
> Kind regards
>
> Kai
>
> On Mon, 26 Jun 2023 at 04:33, Stefan van der Walt <stef...@berkeley.edu>
> wrote:
>
>> Hi Kai,
>>
>> I agree with that the change has maintenance implications for
>> numpy-financial. It's not *hard* building binary wheels, per se, but it's
>> certainly a bigger job than maintaining and testing pure Python.
>>
>> As the maintainer of that library, you should decide whether that's
>> something you wish to take on. Myself and others here can help getting the
>> build set up, if you wish to go that direction.
>>
>> Best regards,
>> Stéfan
>>
>> On Fri, Jun 23, 2023, at 20:47, kaistri...@gmail.com wrote:
>> > TLDR: There has been some discussion regarding moving busday and
>> > related functions to numpy--financial. The sentiment for this has
>> > generally been positive, this thread is to assess the amount of work
>> > required to move these functions.
>> >
>> > Dear NumPy Maintainers,
>> >
>> > There has been some discussion about moving np.busday* to
>> > numpy-financial first on GitHub [1] and more recently on Slack. The
>> > sentiment has largely been positive, however one concern is that the
>> > amount of work required is not justified as few people currently use
>> > these functions and the move could be messy.  I have recently been
>> > contributing to NumPy and am currently the sole maintainer of
>> > numpy-financial, so it feels like I am the right person to do this. In
>> > my opinion, these functions conceptually fit the scope of
>> > numpy-financial.
>> >
>> > However, I have some hesitations about this work. Namely, I am
>> > struggling to estimate the scope of this work and I have only some
>> > experience with C, and the NumPy C API. I am having trouble estimating
>> > the amount of work this would require, but suspect that it will not be
>> > easy. The functions use some of the internal C-API (I think, how do I
>> > find out the differences between the internal/external API?) and
>> > depends on `np.datetime`. Further, the busday* functions are
>> > implemented in C. I only have some experience with C and the C aspects
>> > of NumPy—I am happy to learn, but this seems like a pretty steep
>> > learning curve. Finally, numpy-financial is currently a pure Python
>> > module and does not build C, again I will either need help with this or
>> > to learn how to do this.
>> >
>> > To finish, I have a few questions / requests for advice:
>> >
>> > * Is this change supported by the NumPy community?
>> > * Does anyone have advice on how to estimate the amount of work
>> > required?
>> > * If I start working on this, would anyone be willing to help me learn
>> > the C components?
>> >
>> > Kind regards
>> >
>> > Kai Striega (@Kai-Striega)
>> >
>> > [1]_ https://github.com/numpy/numpy/pull/23229#issuecomment-1467084886
>> > _______________________________________________
>> > NumPy-Discussion mailing list -- numpy-discussion@python.org
>> > To unsubscribe send an email to numpy-discussion-le...@python.org
>> > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
>> > Member address: stef...@berkeley.edu
>> _______________________________________________
>> NumPy-Discussion mailing list -- numpy-discussion@python.org
>> To unsubscribe send an email to numpy-discussion-le...@python.org
>> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
>> Member address: kaistri...@gmail.com
>>
> _______________________________________________
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: ralf.gomm...@gmail.com
>
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to