[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[7b3ac32] | 2 | <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY numpy-download-http "https://files.pythonhosted.org/packages/source/n/numpy/numpy-&numpy-version;.tar.gz">
|
---|
| 8 | <!ENTITY numpy-download-ftp " ">
|
---|
| 9 | <!ENTITY numpy-md5sum "&numpy-md5sum;">
|
---|
[7fc2719] | 10 | <!ENTITY numpy-size "18 MB">
|
---|
| 11 | <!ENTITY numpy-buildsize "104 MB (add 48 MB for tests)">
|
---|
[32ae434] | 12 | <!ENTITY numpy-time "0.6 SBU (add 1.1 SBU for tests)">
|
---|
[7b3ac32] | 13 | ]>
|
---|
| 14 |
|
---|
[0918543] | 15 | <sect2 id="numpy" xreflabel="NumPy-&numpy-version;">
|
---|
[7b3ac32] | 16 |
|
---|
| 17 | <title>NumPy-&numpy-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="numpy">
|
---|
| 20 | <primary sortas="a-numpy">numpy</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect3 role="package">
|
---|
| 24 | <title>Introduction to NumPy Module</title>
|
---|
| 25 |
|
---|
| 26 | <para>
|
---|
| 27 | <application>NumPy</application> is the fundamental package for
|
---|
| 28 | scientific computing with Python.
|
---|
| 29 | </para>
|
---|
| 30 |
|
---|
[f822342] | 31 | &lfs122_checked;
|
---|
[7b3ac32] | 32 |
|
---|
| 33 | <bridgehead renderas="sect4">Package Information</bridgehead>
|
---|
| 34 | <itemizedlist spacing="compact">
|
---|
| 35 | <listitem>
|
---|
| 36 | <para>
|
---|
| 37 | Download (HTTP): <ulink url="&numpy-download-http;"/>
|
---|
| 38 | </para>
|
---|
| 39 | </listitem>
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>
|
---|
| 42 | Download (FTP): <ulink url="&numpy-download-ftp;"/>
|
---|
| 43 | </para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>
|
---|
| 47 | Download MD5 sum: &numpy-md5sum;
|
---|
| 48 | </para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>
|
---|
| 52 | Download size: &numpy-size;
|
---|
| 53 | </para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>
|
---|
| 57 | Estimated disk space required: &numpy-buildsize;
|
---|
| 58 | </para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>
|
---|
| 62 | Estimated build time: &numpy-time;
|
---|
| 63 | </para>
|
---|
| 64 | </listitem>
|
---|
| 65 | </itemizedlist>
|
---|
| 66 |
|
---|
| 67 | <bridgehead renderas="sect4">NumPy Dependencies</bridgehead>
|
---|
| 68 |
|
---|
| 69 | <bridgehead renderas="sect5">Required</bridgehead>
|
---|
| 70 | <para role="required">
|
---|
[aebba67e] | 71 | <xref linkend="cython"/>,
|
---|
| 72 | <xref linkend="meson_python"/>, and
|
---|
[991369a] | 73 | <xref linkend="pyproject-metadata"/>
|
---|
[7b3ac32] | 74 | </para>
|
---|
| 75 |
|
---|
| 76 | <!-- <bridgehead renderas="sect5">Recommended</bridgehead>
|
---|
| 77 | <para role="recommended">
|
---|
| 78 | <xref linkend="setuptools_scm"/>
|
---|
| 79 | </para>-->
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect5">Optional</bridgehead>
|
---|
| 82 | <para role="optional">
|
---|
[a8c1294] | 83 | fortran from <xref linkend="gcc"/>,
|
---|
[543663e] | 84 | <ulink url="https://www.netlib.org/lapack/">lapack and cblas</ulink>, and
|
---|
[a8c1294] | 85 | <ulink url="https://www.openblas.net/">openblas</ulink>
|
---|
[7b3ac32] | 86 | </para>
|
---|
| 87 |
|
---|
| 88 | <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
|
---|
| 89 | <para role="optional">
|
---|
| 90 | <xref linkend="attrs"/>,
|
---|
[aebba67e] | 91 | <xref linkend="pytest"/>,
|
---|
| 92 | <xref linkend="pytz"/>, and
|
---|
[7b3ac32] | 93 | <ulink url="https://pypi.org/project/hypothesis/">hypothesis</ulink>
|
---|
| 94 | </para>
|
---|
| 95 |
|
---|
| 96 | </sect3>
|
---|
| 97 |
|
---|
| 98 | <sect3 role="installation">
|
---|
| 99 | <title>Installation of NumPy</title>
|
---|
| 100 |
|
---|
| 101 | <para> Build the module: </para>
|
---|
| 102 |
|
---|
[3b76db39] | 103 | <screen><userinput>pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir -Csetup-args=-Dallow-noblas=true $PWD</userinput></screen>
|
---|
[7b3ac32] | 104 |
|
---|
| 105 | <para>
|
---|
| 106 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 107 | </para>
|
---|
| 108 |
|
---|
[db244ae2] | 109 | <screen role="root"><userinput>&install-wheel; numpy</userinput></screen>
|
---|
[7b3ac32] | 110 |
|
---|
| 111 | <para>
|
---|
| 112 | The installation can be tested with the following commands:
|
---|
| 113 | </para>
|
---|
| 114 |
|
---|
[c728fa98] | 115 | <screen remap="test"><userinput>mkdir -p test &&
|
---|
[32ae434] | 116 | cd test &&
|
---|
| 117 | python3 -m venv --system-site-packages testenv &&
|
---|
[7b3ac32] | 118 | source testenv/bin/activate &&
|
---|
| 119 | pip3 install hypothesis &&
|
---|
[32ae434] | 120 | python -c "import numpy, sys; sys.exit(numpy.test() is False)"
|
---|
[7b3ac32] | 121 | deactivate</userinput></screen>
|
---|
| 122 |
|
---|
[7fc2719] | 123 | <!-- no && for actual test because of a possible error -->
|
---|
| 124 |
|
---|
[db035ac9] | 125 | <para>
|
---|
[32ae434] | 126 | Two tests, out of over 48000 tests, are known to fail.
|
---|
[523cb74a] | 127 | <!-- test_f2py2e.py::test_untitled_cli,
|
---|
| 128 | test_f2py2e.py::test_no_py312_distutils_fcompiler
|
---|
[32ae434] | 129 | 2 failed, 45996 passed, 2349 skipped, 2785 deselected, 58 xfailed,
|
---|
[7fc2719] | 130 | 5 xpassed in 120.86s (0:02:00)
|
---|
| 131 |
|
---|
| 132 | For 2.0.1 (bdubbs):
|
---|
| 133 | FAILED ../f2py/tests/test_f2py2e.py::test_untitled_cli
|
---|
| 134 | FAILED ../f2py/tests/test_f2py2e.py::test_no_py312_distutils_fcompiler
|
---|
| 135 | 2 failed, 46029 passed, 2349 skipped, 2789 deselected, 58 xfailed,
|
---|
| 136 | 5 xpassed in 119.77s (0:01:59)
|
---|
| 137 | -->
|
---|
[db035ac9] | 138 | </para>
|
---|
| 139 |
|
---|
[7b3ac32] | 140 | </sect3>
|
---|
| 141 |
|
---|
| 142 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 143 | href="../../../xincludes/pip3-cmd-explain.xml"/>
|
---|
| 144 |
|
---|
| 145 | <sect3 role="content">
|
---|
| 146 | <title>Contents</title>
|
---|
| 147 |
|
---|
| 148 | <segmentedlist>
|
---|
| 149 | <segtitle>Installed Programs</segtitle>
|
---|
| 150 | <segtitle>Installed Libraries</segtitle>
|
---|
| 151 | <segtitle>Installed Directories</segtitle>
|
---|
| 152 |
|
---|
| 153 | <seglistitem>
|
---|
| 154 | <seg>
|
---|
| 155 | f2py, f2py3 and f2py&python3-majorver; (3 copies of the same script)
|
---|
| 156 | </seg>
|
---|
| 157 | <!-- we seem not to record the solibs, see e.g. lxml, cairo
|
---|
| 158 | actually, this one has a lot, all with awkward
|
---|
| 159 | * .cpython-311-x86_64-linux-gnu.so names -->
|
---|
| 160 | <seg>None</seg>
|
---|
| 161 | <seg>
|
---|
| 162 | /usr/lib/python&python3-majorver;/site-packages/numpy
|
---|
| 163 | </seg>
|
---|
| 164 | </seglistitem>
|
---|
| 165 | </segmentedlist>
|
---|
| 166 |
|
---|
| 167 | <variablelist>
|
---|
| 168 | <bridgehead renderas="sect5">Short Descriptions</bridgehead>
|
---|
| 169 | <?dbfo list-presentation="list"?>
|
---|
| 170 | <?dbhtml list-presentation="table"?>
|
---|
| 171 |
|
---|
| 172 | <varlistentry id="f2py">
|
---|
| 173 | <term><command>f2py</command></term>
|
---|
| 174 | <listitem>
|
---|
| 175 | <para>
|
---|
| 176 | is the Fortran to Python interface generator utility.
|
---|
| 177 | </para>
|
---|
| 178 | <indexterm zone="numpy f2py">
|
---|
| 179 | <primary sortas="b-f2py">f2py</primary>
|
---|
| 180 | </indexterm>
|
---|
| 181 | </listitem>
|
---|
| 182 | </varlistentry>
|
---|
| 183 |
|
---|
| 184 | </variablelist>
|
---|
| 185 |
|
---|
| 186 | </sect3>
|
---|
| 187 |
|
---|
| 188 | </sect2>
|
---|