Skip to content

Commit cfb1848

Browse files
author
peng.li24
committed
refactor: rename numpy/ → numpycpp/ (match install prefix /usr/include/numpycpp)
Now all headers live inside numpycpp/: #include <numpycpp/numpy.h> # C++ core umbrella #include <numpycpp/numpy_py.h> # pybind11 umbrella #include <numpycpp/numpycpp/init.h> # individual modules Updated all internal includes, CMake install rules, detail header comments, test build config, bench, and example.
1 parent 9abf921 commit cfb1848

27 files changed

Lines changed: 56 additions & 57 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else()
4141
endif()
4242

4343
# ---- Install — header-only C++ library --------------------------------------
44-
install(DIRECTORY numpy
44+
install(DIRECTORY numpycpp
4545
DESTINATION include/numpycpp
4646
FILES_MATCHING PATTERN "*.h"
4747
PATTERN ".pytest_cache" EXCLUDE

bench/bench_core.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "numpy/numpy.h"
2-
#include "numpy/linalg.h"
1+
#include "numpycpp/numpy.h"
2+
#include "numpycpp/linalg.h"
33
#include <benchmark/benchmark.h>
44
#include <vector>
55
#include <random>

example/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <numpy/numpy.h>
1+
#include <numpycpp/numpy.h>
22
#include <iostream>
33
#include <vector>
44

numpy/numpy.h

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// ║ be included INSIDE namespace numpy at end of elementwise.h — nowhere else.║
77
// ║ ║
88
// ║ ✗ #include "numpy/detail/avx512_loops.h" ← compile error ║
9-
// ║ ✓ #include "numpy/numpy.h" ← recommended entry point ║
9+
// ║ ✓ #include "numpycpp/numpy.h" ← recommended entry point ║
1010
// ╚══════════════════════════════════════════════════════════════════════════╝
1111
//
1212
// AVX-512 wide-loop specializations for array math functions.
@@ -29,7 +29,7 @@
2929

3030
#ifndef NUMPYCPP_INTERNAL_INCLUDE
3131
# error "avx512_loops.h is an internal header — do not include directly. \
32-
Use #include "numpy/numpy.h" instead."
32+
Use #include "numpycpp/numpy.h" instead."
3333
#endif
3434
3535
#ifdef __AVX512F__
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// ║ ║
88
// ║ ✗ #include "numpy/detail/blas_bridge.h" ← compile error ║
99
// ║ ✗ numpy::detail::blas_sdot(...) ← undefined behaviour ║
10-
// ║ ✓ #include "numpy/numpy.h" ← recommended entry point ║
10+
// ║ ✓ #include "numpycpp/numpy.h" ← recommended entry point ║
1111
// ║ ✓ numpy::dot(a, b, n) ← public API ║
1212
// ╚══════════════════════════════════════════════════════════════════════════╝
1313
//
@@ -34,7 +34,7 @@
3434

3535
#ifndef NUMPYCPP_INTERNAL_INCLUDE
3636
# error "blas_bridge.h is an internal header — do not include directly. \
37-
Use #include "numpy/numpy.h" instead."
37+
Use #include "numpycpp/numpy.h" instead."
3838
#endif
3939
4040
#include <cstdint>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
// ║ subject to change without notice. ║
77
// ║ ║
88
// ║ ✗ #include "numpy/detail/npy_math_float.h" ← compile error ║
9-
// ║ ✓ #include "numpy/numpy.h" ← only correct entry point ║
9+
// ║ ✓ #include "numpycpp/numpy.h" ← only correct entry point ║
1010
// ╚══════════════════════════════════════════════════════════════════════════╝
1111

1212
#pragma once
1313

1414
#ifndef NUMPYCPP_INTERNAL_INCLUDE
1515
# error "npy_math_float.h is an internal header — do not include directly. \
16-
Use #include \"numpy/numpy.h\" instead."
16+
Use #include \"numpycpp/numpy.h\" instead."
1717
#endif
1818

1919
#include <cstdint>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// ║ but uses only C++ loops — no dlopen, no OpenBLAS, no Fortran ABI. ║
77
// ║ ║
88
// ║ ✗ #include "numpy/detail/std_linalg_backend.h" ← compile error ║
9-
// ║ ✓ #include "numpy/numpy.h" ← entry point ║
9+
// ║ ✓ #include "numpycpp/numpy.h" ← entry point ║
1010
// ║ ✓ cmake … -DNUMPYCPP_STD_ONLY=ON ← selects this backend║
1111
// ╚══════════════════════════════════════════════════════════════════════════╝
1212
//
@@ -23,7 +23,7 @@
2323

2424
#ifndef NUMPYCPP_INTERNAL_INCLUDE
2525
# error "std_linalg_backend.h is an internal header — do not include directly. \
26-
Use #include \"numpy/numpy.h\" instead."
26+
Use #include \"numpycpp/numpy.h\" instead."
2727
#endif
2828

2929
#include <cmath>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// ║ only <cmath> — no dlopen, no SVML, no AVX-512, no numpy dependency. ║
77
// ║ ║
88
// ║ ✗ #include "numpy/detail/std_math_backend.h" ← compile error ║
9-
// ║ ✓ #include "numpy/numpy.h" ← entry point ║
9+
// ║ ✓ #include "numpycpp/numpy.h" ← entry point ║
1010
// ║ ✓ cmake … -DNUMPYCPP_STD_ONLY=ON ← selects this backend ║
1111
// ╚══════════════════════════════════════════════════════════════════════════╝
1212
//
@@ -24,7 +24,7 @@
2424

2525
#ifndef NUMPYCPP_INTERNAL_INCLUDE
2626
# error "std_math_backend.h is an internal header — do not include directly. \
27-
Use #include \"numpy/numpy.h\" instead."
27+
Use #include \"numpycpp/numpy.h\" instead."
2828
#endif
2929

3030
#include <cmath>

0 commit comments

Comments
 (0)