@@ -216,23 +216,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
216
216
Self :: new_uninit ( py, dims, ptr:: null_mut ( ) , flags)
217
217
}
218
218
219
- /// Deprecated name for [`PyArray::new`].
220
- ///
221
- /// # Safety
222
- /// See [`PyArray::new`].
223
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::new`" ) ]
224
- #[ inline]
225
- pub unsafe fn new_bound < ' py , ID > (
226
- py : Python < ' py > ,
227
- dims : ID ,
228
- is_fortran : bool ,
229
- ) -> Bound < ' py , Self >
230
- where
231
- ID : IntoDimension < Dim = D > ,
232
- {
233
- Self :: new ( py, dims, is_fortran)
234
- }
235
-
236
219
pub ( crate ) unsafe fn new_uninit < ' py , ID > (
237
220
py : Python < ' py > ,
238
221
dims : ID ,
@@ -358,22 +341,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
358
341
)
359
342
}
360
343
361
- /// Deprecated name for [`PyArray::borrow_from_array`].
362
- ///
363
- /// # Safety
364
- /// See [`PyArray::borrow_from_array`]
365
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::borrow_from_array`" ) ]
366
- #[ inline]
367
- pub unsafe fn borrow_from_array_bound < ' py , S > (
368
- array : & ArrayBase < S , D > ,
369
- container : Bound < ' py , PyAny > ,
370
- ) -> Bound < ' py , Self >
371
- where
372
- S : Data < Elem = T > ,
373
- {
374
- Self :: borrow_from_array ( array, container)
375
- }
376
-
377
344
/// Construct a new NumPy array filled with zeros.
378
345
///
379
346
/// If `is_fortran` is true, then it has Fortran/column-major order,
@@ -416,16 +383,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
416
383
}
417
384
}
418
385
419
- /// Deprecated name for [`PyArray::zeros`].
420
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::zeros`" ) ]
421
- #[ inline]
422
- pub fn zeros_bound < ID > ( py : Python < ' _ > , dims : ID , is_fortran : bool ) -> Bound < ' _ , Self >
423
- where
424
- ID : IntoDimension < Dim = D > ,
425
- {
426
- Self :: zeros ( py, dims, is_fortran)
427
- }
428
-
429
386
/// Constructs a NumPy from an [`ndarray::Array`]
430
387
///
431
388
/// This method uses the internal [`Vec`] of the [`ndarray::Array`] as the base object of the NumPy array.
@@ -456,12 +413,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
456
413
)
457
414
}
458
415
}
459
- /// Deprecated name for [`PyArray::from_owned_array`].
460
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_owned_array`" ) ]
461
- #[ inline]
462
- pub fn from_owned_array_bound ( py : Python < ' _ > , arr : Array < T , D > ) -> Bound < ' _ , Self > {
463
- Self :: from_owned_array ( py, arr)
464
- }
465
416
466
417
/// Construct a NumPy array from a [`ndarray::ArrayBase`].
467
418
///
@@ -487,16 +438,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
487
438
{
488
439
ToPyArray :: to_pyarray ( arr, py)
489
440
}
490
-
491
- /// Deprecated name for [`PyArray::from_array`].
492
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_array`" ) ]
493
- #[ inline]
494
- pub fn from_array_bound < ' py , S > ( py : Python < ' py > , arr : & ArrayBase < S , D > ) -> Bound < ' py , Self >
495
- where
496
- S : Data < Elem = T > ,
497
- {
498
- Self :: from_array ( py, arr)
499
- }
500
441
}
501
442
502
443
impl < D : Dimension > PyArray < PyObject , D > {
@@ -548,19 +489,6 @@ impl<D: Dimension> PyArray<PyObject, D> {
548
489
)
549
490
}
550
491
}
551
-
552
- /// Deprecated name for [`PyArray::from_owned_object_array`].
553
- #[ deprecated(
554
- since = "0.23.0" ,
555
- note = "renamed to `PyArray::from_owned_object_array`"
556
- ) ]
557
- #[ inline]
558
- pub fn from_owned_object_array_bound < T > (
559
- py : Python < ' _ > ,
560
- arr : Array < Py < T > , D > ,
561
- ) -> Bound < ' _ , Self > {
562
- Self :: from_owned_object_array ( py, arr)
563
- }
564
492
}
565
493
566
494
impl < T : Element > PyArray < T , Ix1 > {
@@ -587,13 +515,6 @@ impl<T: Element> PyArray<T, Ix1> {
587
515
}
588
516
}
589
517
590
- /// Deprecated name for [`PyArray::from_slice`].
591
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_slice`" ) ]
592
- #[ inline]
593
- pub fn from_slice_bound < ' py > ( py : Python < ' py > , slice : & [ T ] ) -> Bound < ' py , Self > {
594
- Self :: from_slice ( py, slice)
595
- }
596
-
597
518
/// Construct a one-dimensional array from a [`Vec<T>`][Vec].
598
519
///
599
520
/// # Example
@@ -613,13 +534,6 @@ impl<T: Element> PyArray<T, Ix1> {
613
534
vec. into_pyarray ( py)
614
535
}
615
536
616
- /// Deprecated name for [`PyArray::from_vec`].
617
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_vec`" ) ]
618
- #[ inline]
619
- pub fn from_vec_bound < ' py > ( py : Python < ' py > , vec : Vec < T > ) -> Bound < ' py , Self > {
620
- Self :: from_vec ( py, vec)
621
- }
622
-
623
537
/// Construct a one-dimensional array from an [`Iterator`].
624
538
///
625
539
/// If no reliable [`size_hint`][Iterator::size_hint] is available,
@@ -643,16 +557,6 @@ impl<T: Element> PyArray<T, Ix1> {
643
557
let data = iter. into_iter ( ) . collect :: < Vec < _ > > ( ) ;
644
558
data. into_pyarray ( py)
645
559
}
646
-
647
- /// Deprecated name for [`PyArray::from_iter`].
648
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_iter`" ) ]
649
- #[ inline]
650
- pub fn from_iter_bound < I > ( py : Python < ' _ > , iter : I ) -> Bound < ' _ , Self >
651
- where
652
- I : IntoIterator < Item = T > ,
653
- {
654
- Self :: from_iter ( py, iter)
655
- }
656
560
}
657
561
658
562
impl < T : Element > PyArray < T , Ix2 > {
@@ -694,16 +598,6 @@ impl<T: Element> PyArray<T, Ix2> {
694
598
Ok ( array)
695
599
}
696
600
}
697
-
698
- /// Deprecated name for [`PyArray::from_vec2`].
699
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_vec2`" ) ]
700
- #[ inline]
701
- pub fn from_vec2_bound < ' py > (
702
- py : Python < ' py > ,
703
- v : & [ Vec < T > ] ,
704
- ) -> Result < Bound < ' py , Self > , FromVecError > {
705
- Self :: from_vec2 ( py, v)
706
- }
707
601
}
708
602
709
603
impl < T : Element > PyArray < T , Ix3 > {
@@ -764,16 +658,6 @@ impl<T: Element> PyArray<T, Ix3> {
764
658
Ok ( array)
765
659
}
766
660
}
767
-
768
- /// Deprecated name for [`PyArray::from_vec3`].
769
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::from_vec3`" ) ]
770
- #[ inline]
771
- pub fn from_vec3_bound < ' py > (
772
- py : Python < ' py > ,
773
- v : & [ Vec < Vec < T > > ] ,
774
- ) -> Result < Bound < ' py , Self > , FromVecError > {
775
- Self :: from_vec3 ( py, v)
776
- }
777
661
}
778
662
779
663
impl < T : Element + AsPrimitive < f64 > > PyArray < T , Ix1 > {
@@ -810,13 +694,6 @@ impl<T: Element + AsPrimitive<f64>> PyArray<T, Ix1> {
810
694
Bound :: from_owned_ptr ( py, ptr) . downcast_into_unchecked ( )
811
695
}
812
696
}
813
-
814
- /// Deprecated name for [`PyArray::arange`].
815
- #[ deprecated( since = "0.23.0" , note = "renamed to `PyArray::arange`" ) ]
816
- #[ inline]
817
- pub fn arange_bound < ' py > ( py : Python < ' py > , start : T , stop : T , step : T ) -> Bound < ' py , Self > {
818
- Self :: arange ( py, start, stop, step)
819
- }
820
697
}
821
698
822
699
unsafe fn clone_elements < T : Element > ( py : Python < ' _ > , elems : & [ T ] , data_ptr : & mut * mut T ) {
0 commit comments