Skip to content

Commit 703abfa

Browse files
committed
Revert "mark new_unchecked methods as unsafe"
This reverts commit 87d3484.
1 parent 25a0529 commit 703abfa

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
- make not-a-knot boundary condition the default
1414
- allow any first or second derivative as boundary condition
1515
- fix typo `Biliniar` -> `Bilinear`
16-
- change `new_unchecked` methods to be marked as `unsafe`
1716

1817
# 0.4.1
1918
- major performance improvement for `interp_scalar()` methods ~-50%

src/interp1d/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,7 @@ where
360360
/// - `x` is stricktly monotonic rising
361361
/// - `data.shape()[0] == x.len()`
362362
/// - the `strategy` is porperly initialized with the data
363-
pub unsafe fn new_unchecked(
364-
x: ArrayBase<Sx, Ix1>,
365-
data: ArrayBase<Sd, D>,
366-
strategy: Strat,
367-
) -> Self {
363+
pub fn new_unchecked(x: ArrayBase<Sx, Ix1>, data: ArrayBase<Sd, D>, strategy: Strat) -> Self {
368364
Interp1D { x, data, strategy }
369365
}
370366

src/interp2d/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ where
327327
/// - `x` and `y` are stricktly monotonic rising
328328
/// - `data.shape()[0] == x.len()`, `data.shape()[1] == y.len()`
329329
/// - the `strategy` is porperly initialized with the data
330-
pub unsafe fn new_unchecked(
330+
pub fn new_unchecked(
331331
x: ArrayBase<Sx, Ix1>,
332332
y: ArrayBase<Sy, Ix1>,
333333
data: ArrayBase<Sd, D>,

0 commit comments

Comments
 (0)