[Cython] bug in doc Tutorials/Working with NumPy

2015-11-07 Thread Stepan Kasal
Hello,

I was learning Cython from this tutorial when I noticed a glitch:

Near the end, after boundscheck False, some variables are changed to 
unsigned int.  But this has unexpected consequences: variables t_from and such
are not determined correctly, as one of the arguments is negative, but gets
cast to unsigned for comaprison.  (Yes, this is a weird feature of C.)

Actually, the use of unsigned does not seem to have any impact on performance,
so I suggest to scratch that part of tutorial.  Just explain that with 
boundscheck
off, negaitive indices no longer work.

(But there might perhaps be one small improvent in cython itself: with 
boundscheck
off, the index might be cast to unsigned before it is used:  this way we 
probably
crash on negative values, instead of silently accessing the negative offset of 
the array data.)

Thank you for nice piece of software,
Stepan Kasal

___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] bug in doc Tutorials/Working with NumPy

2015-11-10 Thread Stepan Kasal
Hello,

On Mon, Nov 09, 2015 at 09:44:15PM -0800, Robert Bradshaw wrote:
> I heartily agree that using unsigned types is the source of much
> surprising pain, we shouldn't be recommending it:

great, thanks a lot for updating the dev doc instantly.

> There's two directives: wraparound and boundscheck. The wraparound
> directive can be used to disable the check for negative values.

And thanks for catching this; I misunderstood this.

Stepan
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


[Cython] [PATCH] docs: link to specific changelog item

2020-11-20 Thread Stepan Kasal
Helllo,

while reading the docs, I noticed that a link is less specific than possible.
The URL points to a section in Python 3.8 Changelog, while the relevant item
is about 25th in the list.  It took me some time to find out: I wasn't able
to realize what is the relevat part of changelog at first.  I haven't understood
it until I returned to the page after some research elsewhere.

Attach please find proposed one-line patch to the docs, against current master.
(Sorry, I cannot easily create PR at the moment.)

With kind reagrds,
   Stepan Kasal
>From b625dc61a5c1af71295240743e4cde7ddc95c9c3 Mon Sep 17 00:00:00 2001
From: Stepan Kasal 
Date: Fri, 20 Nov 2020 09:42:07 +0100
Subject: [PATCH] docs: link to specific changelog item

---
 docs/src/tutorial/appendix.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/src/tutorial/appendix.rst b/docs/src/tutorial/appendix.rst
index c76d6f6c3..ea93bb54b 100644
--- a/docs/src/tutorial/appendix.rst
+++ b/docs/src/tutorial/appendix.rst
@@ -32,7 +32,7 @@ Python 3.8+
 ---
 
 Since Python 3.8, the search paths of DLL dependencies has been reset.
-(`changelog <https://docs.python.org/3/whatsnew/3.8.html#changes-in-the-python-api>`_)
+(`changelog <https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew>`_)
 
 Only the system paths, the directory containing the DLL or PYD file
 are searched for load-time dependencies.
-- 
2.27.0.windows.1

___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel