Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilger26 committed Jan 31, 2021
2 parents 370b6ea + 54d060d commit f532542
Show file tree
Hide file tree
Showing 1,729 changed files with 39,567 additions and 18,698 deletions.
23 changes: 15 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
os: linux
dist: focal
language: cpp

compiler:
- gcc

notifications:
email: false

before_install:
- sudo apt update
- sudo apt remove --purge cmake
- sudo apt install libboost-all-dev

- sudo apt install -y libtbb-dev
- python3 --version
- pip3 install -U pip
- pip3 install -U pytest
- pip3 install -U numpy
- pip3 install -U scipy
- pip3 install -U astropy
- pip3 install -U matplotlib
- pip3 install -U mpmath
- pip3 install -U vectormath
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
Expand All @@ -20,11 +25,13 @@ install:
- mv cmake-3.17.1-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}

script:
- mkdir build
- cd build
- cmake .. -DBUILD_EXAMPLE_GAUSS_NEWTON_NLLS=ON -DBUILD_EXAMPLE_README=ON
- cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLE_GAUSS_NEWTON_NLLS=ON -DBUILD_EXAMPLE_README=ON
- cmake --build . --config Release --target NumCppPy
- cmake --build . --config Release --target GaussNewtonNlls
- cmake --build . --config Release --target ReadMe
- sudo make install
- cd ../test/pytest
- python -m pytest
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

option(BUILD_ALL "Build All targets")
option(BUILD_DOCS "Build the doxygen documentation")
option(BUILD_TESTS "Build the unit tests")
option(BUILD_EXAMPLE_ALL "Build all of the examples")
Expand All @@ -14,6 +15,12 @@ option(BUILD_EXAMPLE_INTERFACE_WITH_EIGEN "Build the Interface with Eigen exampl
option(BUILD_EXAMPLE_INTERFACE_WITH_OPENCV "Build the Interface with OpenCV example")
option(BUILD_EXAMPLE_README "Build the README example")

if(BUILD_ALL)
set(BUILD_DOCS ON)
set(BUILD_TESTS ON)
set(BUILD_EXAMPLE_ALL ON)
endif()

include(NumCppTools)
numcpp_find_version_file("" NUMCPP_VERSION_FILE)
message(STATUS "Found version file: ${NUMCPP_VERSION_FILE}")
Expand Down
66 changes: 7 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![GitHub stars](https://img.shields.io/github/stars/dpilger26/NumCpp.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/dpilger26/NumCpp/stargazers/)
[![GitHub forks](https://img.shields.io/github/forks/dpilger26/NumCpp.svg?style=social&label=Fork&maxAge=2592000)](https://GitHub.com/dpilger26/NumCpp/network/) -->

[![C++14](https://img.shields.io/badge/C%2B%2B-14-blue.svg)](https://isocpp.org/std/the-standard)
[![Build status](https://ci.appveyor.com/api/projects/status/slxre2j64qc8ubvl/branch/master?svg=true)](https://ci.appveyor.com/project/dpilger26/numcpp/branch/master)
[![Build Status](https://travis-ci.org/dpilger26/NumCpp.svg?branch=master)](https://travis-ci.org/dpilger26/NumCpp)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ea24c08d892e4beebd46cfca260823c1)](https://app.codacy.com/manual/dpilger26/NumCpp?utm_source=github.com&utm_medium=referral&utm_content=dpilger26/NumCpp&utm_campaign=Badge_Grade_Dashboard)
Expand All @@ -17,35 +16,20 @@

## License [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)

Copyright 2020 David Pilger

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files(the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Testing

**C++ Standards:**
C++14
C++17
C++2a
[![C++14](https://img.shields.io/badge/C%2B%2B-14-blue.svg)](https://isocpp.org/std/the-standard)
[![C++17](https://img.shields.io/badge/C%2B%2B-17-blue.svg)](https://isocpp.org/std/the-standard)
[![C++20](https://img.shields.io/badge/C%2B%2B-20-blue.svg)](https://isocpp.org/std/the-standard)

**Compilers:**
Visual Studio: 2017, 2019
GNU: 6.5, 7.5, 8.4, 9.3, 10.1
Clang: 6, 7, 8, 9, 10

**Boost Versions:**
1.68, 1.70, 1.72, and 1.73
1.68+

## [Documentation](https://dpilger26.github.io/NumCpp)

Expand All @@ -55,43 +39,7 @@ Clang: 6, 7, 8, 9, 10

## [Building](https://dpilger26.github.io/NumCpp/doxygen/html/md__c_1__github__num_cpp_docs_markdown__building.html)

## Release Notes

### Version 2.3.0

* Added slicing to DataCube class

### Version 2.2.0

* Added additional where() overloads to match NumPy functionality

### Version 2.1.0

* Improved installation and usage with CMake find_package support
* Various minor improvements

### Version 2.0.0

* Dropped support of C++11, now requires a C++14 or higher compiler
* Added support for `std::complex<T>`, closing __Issue #58__
* Added more `NdArray` constructors for STL containers including `std::vector<std::vector<T>>`, closing __Issue #59__
* Added `polyfit` routine inline with Numpy `polyfit`, closing __Issue #61__
* Added ability to use `NdArray` as container for generic structs
* Non-linear least squares fitting using Gauss-Newton
* Root finding routines
* Numerical integration routines
* `lu_decomposition` and `pivotLU_decomposition` added to `Linalg` namespace
* New STL iterators added to `NdArray`
* `iterator`
* `const_iterator`
* `reverse_iterator`
* `const_reverse_iterator`
* `column_iterator`
* `const_column_iterator`
* `reverse_column_iterator`
* `const_reverse_column_iterator`
* Added `rodriguesRotation` and `wahbasProblem` to `Rotations` namespace
* Various efficiency and/or bug fixes
## [Release Notes](https://dpilger26.github.io/NumCpp/doxygen/html/md__c_1__github__num_cpp_docs_markdown__release_notes.html)

## From NumPy To NumCpp – A Quick Start Guide

Expand Down Expand Up @@ -147,8 +95,8 @@ The random module provides simple ways to create random arrays.
| **NumPy** | **NumCpp** |
|:--------------------------------------------------------:|:--------------------------------------------------------:|
| ```np.random.seed(666)``` | ```nc::random::seed(666)``` |
| ```np.random.randn(3, 4)``` | ```nc::random::randn<double>(nc::Shape(3,4))``` |
| | ```nc::random::randn<double>({3, 4})``` |
| ```np.random.randn(3, 4)``` | ```nc::random::randN<double>(nc::Shape(3,4))``` |
| | ```nc::random::randN<double>({3, 4})``` |
| ```np.random.randint(0, 10, [3, 4])``` | ```nc::random::randInt<int>(nc::Shape(3,4),0,10)``` |
| | ```nc::random::randInt<int>({3, 4},0,10)``` |
| ```np.random.rand(3, 4)``` | ```nc::random::rand<double>(nc::Shape(3,4))``` |
Expand Down
23 changes: 12 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ version: '{build}'
branches:
only:
- master
- develop
image: Previous Visual Studio 2019
platform: x64
configuration: Release
build_script:
- cmd: >-
mkdir build
cd build
cmake .. -DBUILD_EXAMPLE_GAUSS_NEWTON_NLLS=ON -DBUILD_EXAMPLE_README=ON -DBOOST_ROOT=C:\Libraries\boost_1_73_0
cmake --build . --config Release --target GaussNewtonNlls
cmake --build . --config Release --target ReadMe
cd C:\projects\numcpp &&
mkdir build &&
cd build &&
cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLE_GAUSS_NEWTON_NLLS=ON -DBUILD_EXAMPLE_README=ON -DBOOST_ROOT="C:\Libraries\boost_1_73_0" &&
cmake --build . --config Release &&
cmake --build . --config Release --target install
test: off
test_script:
- cmd: >-
C:\Python38-x64\python -m pip install -U pytest numpy scipy astropy matplotlib mpmath vectormath &&
cd C:\projects\numcpp\test\pytest &&
C:\Python38-x64\python -m pytest
1 change: 1 addition & 0 deletions docs/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_CURRENT_SOURCE_DIR@/README.md \
@CMAKE_CURRENT_SOURCE_DIR@/docs/markdown/ReleaseNotes.md \
@CMAKE_CURRENT_SOURCE_DIR@/docs/markdown/Installation.md \
@CMAKE_CURRENT_SOURCE_DIR@/docs/markdown/Building.md \
@CMAKE_CURRENT_SOURCE_DIR@/include \
Expand Down
4 changes: 2 additions & 2 deletions docs/doxygen/html/_bisection_8hpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">NumCpp
&#160;<span id="projectnumber">2.3.1</span>
&#160;<span id="projectnumber">2.4.0</span>
</div>
<div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
</td>
Expand Down Expand Up @@ -113,7 +113,7 @@
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>David Pilger <a href="#" onclick="location.href='mai'+'lto:'+'dpi'+'lg'+'er2'+'6@'+'gma'+'il'+'.co'+'m'; return false;">dpilg<span style="display: none;">.nosp@m.</span>er26<span style="display: none;">.nosp@m.</span>@gmai<span style="display: none;">.nosp@m.</span>l.co<span style="display: none;">.nosp@m.</span>m</a> <a href="https://github.com/dpilger26/NumCpp">GitHub Repository</a></dd></dl>
<p>License Copyright 2019 Benjamin Mahr Copyright 2020 David Pilger</p>
<p>License Copyright 2019 Benjamin Mahr Copyright 2018-2021 David Pilger</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/doxygen/html/_bisection_8hpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">NumCpp
&#160;<span id="projectnumber">2.3.1</span>
&#160;<span id="projectnumber">2.4.0</span>
</div>
<div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
</td>
Expand Down Expand Up @@ -197,7 +197,7 @@
<div class="ttc" id="anamespacenc_html"><div class="ttname"><a href="namespacenc.html">nc</a></div><div class="ttdef"><b>Definition:</b> Coordinate.hpp:44</div></div>
<div class="ttc" id="anamespacenc_html_a39da0502565b913855379ea1439047e1"><div class="ttname"><a href="namespacenc.html#a39da0502565b913855379ea1439047e1">nc::swap</a></div><div class="ttdeci">void swap(NdArray&lt; dtype &gt; &amp;inArray1, NdArray&lt; dtype &gt; &amp;inArray2) noexcept</div><div class="ttdef"><b>Definition:</b> swap.hpp:42</div></div>
<div class="ttc" id="a_types_8hpp_html"><div class="ttname"><a href="_types_8hpp.html">Types.hpp</a></div></div>
<div class="ttc" id="anamespacenc_1_1random_html_a00229c23da25284daf436c0a338ea25c"><div class="ttname"><a href="namespacenc_1_1random.html#a00229c23da25284daf436c0a338ea25c">nc::random::f</a></div><div class="ttdeci">dtype f(dtype inDofN, dtype inDofD)</div><div class="ttdef"><b>Definition:</b> f.hpp:57</div></div>
<div class="ttc" id="anamespacenc_1_1random_html_a00229c23da25284daf436c0a338ea25c"><div class="ttname"><a href="namespacenc_1_1random.html#a00229c23da25284daf436c0a338ea25c">nc::random::f</a></div><div class="ttdeci">dtype f(dtype inDofN, dtype inDofD)</div><div class="ttdef"><b>Definition:</b> f.hpp:56</div></div>
<div class="ttc" id="aclassnc_1_1roots_1_1_bisection_html_a1199a68b6f57fee8b24bfc59ffeff486"><div class="ttname"><a href="classnc_1_1roots_1_1_bisection.html#a1199a68b6f57fee8b24bfc59ffeff486">nc::roots::Bisection::solve</a></div><div class="ttdeci">double solve(double a, double b)</div><div class="ttdef"><b>Definition:</b> Bisection.hpp:94</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
Expand Down
4 changes: 2 additions & 2 deletions docs/doxygen/html/_boost_interface_8hpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">NumCpp
&#160;<span id="projectnumber">2.3.1</span>
&#160;<span id="projectnumber">2.4.0</span>
</div>
<div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
</td>
Expand Down Expand Up @@ -129,7 +129,7 @@
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>David Pilger <a href="#" onclick="location.href='mai'+'lto:'+'dpi'+'lg'+'er2'+'6@'+'gma'+'il'+'.co'+'m'; return false;">dpilg<span style="display: none;">.nosp@m.</span>er26<span style="display: none;">.nosp@m.</span>@gmai<span style="display: none;">.nosp@m.</span>l.co<span style="display: none;">.nosp@m.</span>m</a> <a href="https://github.com/dpilger26/NumCpp">GitHub Repository</a></dd></dl>
<p>License Copyright 2020 David Pilger</p>
<p>License Copyright 2018-2021 David Pilger</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
Expand Down
Loading

0 comments on commit f532542

Please sign in to comment.