mukulikaa / numpy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from numpy/numpy
The fundamental package for scientific computing with Python.
Home Page: https://numpy.org
License: Other
This project forked from numpy/numpy
The fundamental package for scientific computing with Python.
Home Page: https://numpy.org
License: Other
The Structured arrays page in NumPy fundamentals is very useful and easy to understand. Only the Recarray Helper Functions subsection seems to be reference material so I think we can move it to API reference. I am not sure exactly where we can place this material though. Maybe we can add it under numpy.rec ? Also, I have checked that it is not duplicate material and does not already exist in the reference.
cc: @melissawm @rossbar
Please add this functionality because it is used here:
code example
The Writing custom array containers document seems to be a good tutorial instead of an explanation because it
Also, phrases like "Notice that the return type is...", "We will do x", etc. are used.
I think we can rewrite some parts and make the doc conform to NumPy's tutorial format. Granted it does not have a storyline like the recent tutorials, we can still add it to them I guess?
Note: There is a slight error in the __init__
method of the example; it should be self.i = value
instead of self._i = value
. Right now if we try to reproduce the example it gives an AttributeError: 'DiagonalArray' object has no attribute 'i'
. If it is a priority I will fix that before updating the rest of the doc.
Let me know your thoughts @melissawm and @rossbar!
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc555e7a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc555b79000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fc55585b000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc5584ed000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fc55561e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc555408000)
Traceback (most recent call last):
File "/home/zanella/Test_Cases/vertical_flap/structural/run.py", line 26, in <module>
from mbc_py_interface import mbcNodal
File "/home/zanella/softwares/mbdyn-develop/libexec/mbpy/mbc_py_interface.py", line 33, in <module>
from numpy import *
File "/home/zanella/softwares/Python-3.9.0/lib/python3.9/site-packages/numpy-1.20.3-py3.9-linux-x86_64.egg/numpy/__init__.py", line 145, in <module>
from . import core
File "/home/zanella/softwares/Python-3.9.0/lib/python3.9/site-packages/numpy-1.20.3-py3.9-linux-x86_64.egg/numpy/core/__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Build fails on xyz
with abc
export CC=/path/to/gcc7
python setup.py build
Defaulting to user installation because normal site-packages is not writeable
Processing /autofs/nccs-svm1_home1/[...]/numpy
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: numpy
Building wheel for numpy (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /sw/summit/python/3.7/anaconda3/5.3.0/bin/python /sw/summit/python/3.7/anaconda3/5.3.0/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp_k8vx39q
cwd: /tmp/pip-req-build-vyase0q6
Complete output (860 lines):
gcc: build/src.linux-ppc64le-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.c
gcc: build/src.linux-ppc64le-3.7/numpy/core/src/umath/loops_exponent_log.dispatch.c
gcc: build/src.linux-ppc64le-3.7/numpy/core/src/umath/loops_arithmetic.dispatch.c
In file included from numpy/core/src/common/simd/vsx/vsx.h:73:0,
from numpy/core/src/common/simd/simd.h:40,
from numpy/core/src/umath/loops_arithm_fp.dispatch.c.src:9:
numpy/core/src/common/simd/vsx/operators.h: In function 'npyv_and_b64':
numpy/core/src/common/simd/vsx/operators.h:71:1: error: invalid parameter combination for AltiVec intrinsic __builtin_vec_and
NPYV_IMPL_VSX_BIN_B64(and)
^~~~~~~~~~~~~~~~~~~~~
In file included from numpy/core/src/common/simd/vsx/vsx.h:73:0,
from numpy/core/src/common/simd/simd.h:40,
from numpy/core/src/umath/loops_arithmetic.dispatch.c.src:11:
numpy/core/src/common/simd/vsx/operators.h: In function 'npyv_and_b64':
numpy/core/src/common/simd/vsx/operators.h:71:1: error: invalid parameter combination for AltiVec intrinsic __builtin_vec_and
NPYV_IMPL_VSX_BIN_B64(and)
^~~~~~~~~~~~~~~~~~~~~
In file included from numpy/core/src/common/simd/vsx/vsx.h:73:0,
ppc64le-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.o.d -O3 -mcpu=power8" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
NumPy: 1.22.0.dev0+944.gc6ac4dab5
Python: 3.9.5
I think something should be replaced with something else.
No response
Continuing the discussion from numpy#14038:
I would remove the "Single element indexing", "Other indexing options", "Index arrays", "Indexing Multi-dimensional arrays", "Boolean or “mask” index arrays", and "Combining index arrays with slices", but make sure the content exists on the reference page.
The information you remove from the user page about mixing indexing types should be merged in under Advanced Indexing".
I agree with Matti here; most of the concepts in the basics doc are already covered in the reference one. Apart from Combining index arrays with slices, the other unique sections seem to be Assigning values to indexed arrays and Dealing with variable numbers of indices within programs. We can let them remain in the basics documentation or include them in a new how-to for all types of indexing.
I feel that having a how-to instead of an explanation for ndarray indexing would make sense because users are more likely to want to know exactly how should they use indexing for their particular use-case. But again, I am not an experienced user so there might be a need for explanations too.
If we want to keep the basics document, I would suggest renaming one of the docs. The basics doc could be renamed to Indexing basics
, for example.
Let me know what you think @melissawm and @rossbar!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.