On 3/6/21, zoj613 wrote:
> Hi All,
>
> I noticed that the transformed rejection method for generating Poisson
> random variables used in numpy makes use of the `random_loggam` function
> which directly calculates the log-gamma function. It appears that a
> log-factorial lookup table was added a
Currently. working with strings in numpy is not very convenient. You have
to use a separate set of functions in a separate namespace, and those
functions are relatively limited and poorly-documented.
A solution several other projects, including pandas [0] and xarray [1],
have found are string
Hi All,
I noticed that the transformed rejection method for generating Poisson
random variables used in numpy makes use of the `random_loggam` function
which directly calculates the log-gamma function. It appears that a
log-factorial lookup table was added a few years back which could be used in
Thanks you, this looks very informative. Is there a best practice guide
somewhere in the docs on how to correctly expose C-level code to third
parties via .pxd files, similarly to how one can access the c_distributions
of numpy via cython? I tried this previously and failed miserably. It seemed
The are in np.char
mystr = np.array(["test first", "test second", "test third"])
np.char.title(mystr)
array(['Test First', 'Test Second', 'Test Third'], dtype='http://numpy-discussion.10968.n7.nabble.com/
___
NumPy-Discussion mailing list
Ah, I had a suspicion that it was to preserve the random stream but wasn't
too sure. Thanks for the clarification.
--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
On Sat, Mar 6, 2021 at 1:45 PM Warren Weckesser
wrote:
> At the time, making that change was not a high priority, so I didn't
> pursue it. It does make sense to use the logfactorial function there,
> and I'd be happy to see it updated, but be aware that making the
> change is more work than
This is a different topic altogether. I think you would get better
results asking on the cython-users mailing list with a concrete example
of something that didn't work.
Matti
On 3/6/21 7:52 PM, zoj613 wrote:
Is there a best practice guide
somewhere in the docs on how to correctly expose
On Sat, Mar 6, 2021 at 12:57 PM dan_patterson
wrote:
> The are in np.char
>
> mystr = np.array(["test first", "test second", "test third"])
>
> np.char.title(mystr)
> array(['Test First', 'Test Second', 'Test Third'], dtype='
I mentioned those in my email, but they are far less convenient to