[Numpy-discussion] help needed

2020-10-23 Thread Amardeep Singh
Hi All

I am a new joiner.Using macbook.
Can someone please guide me how to debug numpy using clion?
I am able to build not sure about debugging the c code.

ProductName: Mac OS X

ProductVersion: 10.15.7

BuildVersion: 19H2


thx
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] help needed

2020-10-23 Thread Sebastian Berg
On Sat, 2020-10-24 at 01:50 +0800, Amardeep Singh wrote:
> Hi All
> 
> I am a new joiner.Using macbook.
> Can someone please guide me how to debug numpy using clion?
> I am able to build not sure about debugging the c code.
> 
> ProductName: Mac OS X
> 
> ProductVersion: 10.15.7
> 
> BuildVersion: 19H2



Hi,

I have set up an bogus `CMakeLists.txt` (actually using `python
runtests.py` for compilation and running).  That should allow you to
use debugging tools in editors relying on cmake normally.

My current file is below. This is the opposite of polished or thought
out, so happy to learn of a better solution. And for example recently I
added `NULL=0` because I had issues without really digging into why and
I am sure it lists many files multiple times:



cmake_minimum_required(VERSION 3.13)

#cmake_policy(SET CMP0074 NEW)

project(NumPy-dummy)


AUX_SOURCE_DIRECTORY(numpy/core/src/multiarray/ MULTIARRAY)
AUX_SOURCE_DIRECTORY(numpy/core/src/umath/ UMATH)
AUX_SOURCE_DIRECTORY(numpy/core/src/common/ COMMON)
AUX_SOURCE_DIRECTORY(numpy/core/src/npymath/ NPYMATH)
AUX_SOURCE_DIRECTORY(numpy/core/src/npysort/ NPYSORT)

AUX_SOURCE_DIRECTORY(numpy/core/include/ NPYINCLUDE)
AUX_SOURCE_DIRECTORY(numpy/core/include/numpy/ NPYINCLUDEFULL)

AUX_SOURCE_DIRECTORY(build/testenv/lib/python3.8/site-packages/numpy/core/include/numpy/
 INSTALLED_NUMPY)
AUX_SOURCE_DIRECTORY(build/src.linux-x86_64-3.8/numpy/core/src/multiarray/ 
HELPER_FOR_C_SCR_FILES)

set(
SOURCE_FILES
${MULTIARRAY}
${UMATH}
${COMMON}
${NPYMATH}
${NPYSORT}
numpy/core/src/multiarray/
build/src.linux-x86_64-3.8/numpy/core/include/
build/src.linux-x86_64-3.8/numpy/core/include/numpy/
build/src.linux-x86_64-3.8/numpy/core/include/numpy/__multiarray_api.c
build/src.linux-x86_64-3.8/numpy/core/src/common/
build/src.linux-x86_64-3.8/numpy/core/src/umath/
build/src.linux-x86_64-3.8/numpy/core/src/multiarray/
build/src.linux-x86_64-3.8/numpy/core/src/npymath/
build/src.linux-x86_64-3.8/numpy/core/src/npysort/
numpy/core/src/common/
numpy/core/include/)

set(CMAKE_INCLUDE_PATH SOURCE_FILES)

add_compile_definitions(NPY_INTERNAL_BUILD)
add_compile_definitions([=[NPY_VISIBILITY_HIDDEN=__attribute__((visibility("hidden")))]=])
# add_compile_definitions(NPY_VISIBILITY_HIDDEN=)

add_compile_definitions(NULL=0)
#add_compile_definitions(NPY_SIZEOF_SHORT=2)
#add_compile_definitions(NPY_SIZEOF_INT=4)
#add_compile_definitions(NPY_SIZEOF_LONG=8)
#add_compile_definitions(NPY_SIZEOF_LONGLONG=8)
#add_compile_definitions(NPY_SIZEOF_PY_INTPTR_T=8)


# Find default python libraries and interpreter
#find_package(PythonInterp 3 REQUIRED)
#find_package(PythonLibs 3 REQUIRED)

#include_directories(${SOURCE_FILES} ${PYTHON_INCLUDE_DIRS})  # 
PYTHON_INCLUDE_DIRS also picks up the wrong numpy files...
# The "clean" version below is manually edited with numpy removed...
# I manuall deleted sudo rm -rf /usr/include/numpy, but I do not think it 
should have been there?!
#include_directories(${SOURCE_FILES} 
/home/sebastian/venvs/pydbg-clean/include/python3.8d)
include_directories(${SOURCE_FILES} /usr/include/python3.8)

add_executable(asdf 
build/src.linux-x86_64-3.8/numpy/core/include/numpy/__multiarray_api.c 
${SOURCE_FILES})




> 
> 
> thx
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion



signature.asc
Description: This is a digitally signed message part
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Fwd: Documentation Team meeting - Monday October 12

2020-10-23 Thread Melissa Mendonça
Hi all!

This is a reminder that our next Documentation Team meeting will be on *Monday,
October 26* at 3PM UTC**.

If you wish to join on Zoom, **you need to use this NEW link**

https://zoom.us/j/96219574921?pwd=VTRNeGwwOUlrYVNYSENpVVBRRjlkZz09


Here's the permanent hackmd document with the meeting notes (still being
updated in the next few days!):

https://hackmd.io/oB_boakvRqKR-_2jRV-Qjg


Hope to see you around!

** You can click this link to get the correct time at your timezone:
https://www.timeanddate.com/worldclock/fixedtime.html?msg=NumPy+Documentation+Team+Meeting&iso=20201026T15&p1=1440&ah=1

*** You can add the NumPy community calendar to your google calendar by
clicking this link:
https://calendar.google.com/calendar/r?cid=YmVya2VsZXkuZWR1X2lla2dwaWdtMjMyamJobGRzZmIyYzJqODFjQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20

- Melissa
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] help needed

2020-10-23 Thread Amardeep Singh
How do you use the debug enabled cpython on mac.i guess we need it.
You build cpython from source?

this is mytest.py file

import numpy as np
x = np.arange(5)
np.empty_like(x)

i run this command

gdb --args python3 runtests.py -g --python3 mytest.py

i get this

Reading symbols from python3...
(No debugging symbols found in python3)
(gdb)

sh-3.2# which python3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
sh-3.2#








On Sat, Oct 24, 2020 at 2:09 AM Sebastian Berg 
wrote:

> On Sat, 2020-10-24 at 01:50 +0800, Amardeep Singh wrote:
> > Hi All
> >
> > I am a new joiner.Using macbook.
> > Can someone please guide me how to debug numpy using clion?
> > I am able to build not sure about debugging the c code.
> >
> > ProductName: Mac OS X
> >
> > ProductVersion: 10.15.7
> >
> > BuildVersion: 19H2
>
>
>
> Hi,
>
> I have set up an bogus `CMakeLists.txt` (actually using `python
> runtests.py` for compilation and running).  That should allow you to
> use debugging tools in editors relying on cmake normally.
>
> My current file is below. This is the opposite of polished or thought
> out, so happy to learn of a better solution. And for example recently I
> added `NULL=0` because I had issues without really digging into why and
> I am sure it lists many files multiple times:
>
>
>
> cmake_minimum_required(VERSION 3.13)
>
> #cmake_policy(SET CMP0074 NEW)
>
> project(NumPy-dummy)
>
>
> AUX_SOURCE_DIRECTORY(numpy/core/src/multiarray/ MULTIARRAY)
> AUX_SOURCE_DIRECTORY(numpy/core/src/umath/ UMATH)
> AUX_SOURCE_DIRECTORY(numpy/core/src/common/ COMMON)
> AUX_SOURCE_DIRECTORY(numpy/core/src/npymath/ NPYMATH)
> AUX_SOURCE_DIRECTORY(numpy/core/src/npysort/ NPYSORT)
>
> AUX_SOURCE_DIRECTORY(numpy/core/include/ NPYINCLUDE)
> AUX_SOURCE_DIRECTORY(numpy/core/include/numpy/ NPYINCLUDEFULL)
>
> AUX_SOURCE_DIRECTORY(build/testenv/lib/python3.8/site-packages/numpy/core/include/numpy/
> INSTALLED_NUMPY)
> AUX_SOURCE_DIRECTORY(build/src.linux-x86_64-3.8/numpy/core/src/multiarray/
> HELPER_FOR_C_SCR_FILES)
>
> set(
> SOURCE_FILES
> ${MULTIARRAY}
> ${UMATH}
> ${COMMON}
> ${NPYMATH}
> ${NPYSORT}
> numpy/core/src/multiarray/
> build/src.linux-x86_64-3.8/numpy/core/include/
> build/src.linux-x86_64-3.8/numpy/core/include/numpy/
>
> build/src.linux-x86_64-3.8/numpy/core/include/numpy/__multiarray_api.c
> build/src.linux-x86_64-3.8/numpy/core/src/common/
> build/src.linux-x86_64-3.8/numpy/core/src/umath/
> build/src.linux-x86_64-3.8/numpy/core/src/multiarray/
> build/src.linux-x86_64-3.8/numpy/core/src/npymath/
> build/src.linux-x86_64-3.8/numpy/core/src/npysort/
> numpy/core/src/common/
> numpy/core/include/)
>
> set(CMAKE_INCLUDE_PATH SOURCE_FILES)
>
> add_compile_definitions(NPY_INTERNAL_BUILD)
>
> add_compile_definitions([=[NPY_VISIBILITY_HIDDEN=__attribute__((visibility("hidden")))]=])
> # add_compile_definitions(NPY_VISIBILITY_HIDDEN=)
>
> add_compile_definitions(NULL=0)
> #add_compile_definitions(NPY_SIZEOF_SHORT=2)
> #add_compile_definitions(NPY_SIZEOF_INT=4)
> #add_compile_definitions(NPY_SIZEOF_LONG=8)
> #add_compile_definitions(NPY_SIZEOF_LONGLONG=8)
> #add_compile_definitions(NPY_SIZEOF_PY_INTPTR_T=8)
>
>
> # Find default python libraries and interpreter
> #find_package(PythonInterp 3 REQUIRED)
> #find_package(PythonLibs 3 REQUIRED)
>
> #include_directories(${SOURCE_FILES} ${PYTHON_INCLUDE_DIRS})  #
> PYTHON_INCLUDE_DIRS also picks up the wrong numpy files...
> # The "clean" version below is manually edited with numpy removed...
> # I manuall deleted sudo rm -rf /usr/include/numpy, but I do not think it
> should have been there?!
> #include_directories(${SOURCE_FILES}
> /home/sebastian/venvs/pydbg-clean/include/python3.8d)
> include_directories(${SOURCE_FILES} /usr/include/python3.8)
>
> add_executable(asdf
> build/src.linux-x86_64-3.8/numpy/core/include/numpy/__multiarray_api.c
> ${SOURCE_FILES})
>
>
>
>
> >
> >
> > thx
> > ___
> > NumPy-Discussion mailing list
> > NumPy-Discussion@python.org
> > https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] ENH: Changed repr of np.bool_ #17592 (requesting confirmation)

2020-10-23 Thread Ganesh Kathiresan
Hi All,

I have raised a PR to change the
np.bool_ string representation to avoid confusion with python's True and
False as mentioned in this issue
.

This change makes string representation of np.bool_ into numpy.True_ and
numpy.False_

As Eric mentioned, I wanted your feedback on the change and if we can go
ahead with this idea.

Regards,
Ganesh
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion