@@ -216,23 +216,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
216216 Self :: new_uninit ( py, dims, ptr:: null_mut ( ) , flags)
217217 }
218218
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-
236219 pub ( crate ) unsafe fn new_uninit < ' py , ID > (
237220 py : Python < ' py > ,
238221 dims : ID ,
@@ -358,22 +341,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
358341 )
359342 }
360343
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-
377344 /// Construct a new NumPy array filled with zeros.
378345 ///
379346 /// If `is_fortran` is true, then it has Fortran/column-major order,
@@ -416,16 +383,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
416383 }
417384 }
418385
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-
429386 /// Constructs a NumPy from an [`ndarray::Array`]
430387 ///
431388 /// 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> {
456413 )
457414 }
458415 }
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- }
465416
466417 /// Construct a NumPy array from a [`ndarray::ArrayBase`].
467418 ///
@@ -487,16 +438,6 @@ impl<T: Element, D: Dimension> PyArray<T, D> {
487438 {
488439 ToPyArray :: to_pyarray ( arr, py)
489440 }
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- }
500441}
501442
502443impl < D : Dimension > PyArray < PyObject , D > {
@@ -548,19 +489,6 @@ impl<D: Dimension> PyArray<PyObject, D> {
548489 )
549490 }
550491 }
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- }
564492}
565493
566494impl < T : Element > PyArray < T , Ix1 > {
@@ -587,13 +515,6 @@ impl<T: Element> PyArray<T, Ix1> {
587515 }
588516 }
589517
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-
597518 /// Construct a one-dimensional array from a [`Vec<T>`][Vec].
598519 ///
599520 /// # Example
@@ -613,13 +534,6 @@ impl<T: Element> PyArray<T, Ix1> {
613534 vec. into_pyarray ( py)
614535 }
615536
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-
623537 /// Construct a one-dimensional array from an [`Iterator`].
624538 ///
625539 /// If no reliable [`size_hint`][Iterator::size_hint] is available,
@@ -643,16 +557,6 @@ impl<T: Element> PyArray<T, Ix1> {
643557 let data = iter. into_iter ( ) . collect :: < Vec < _ > > ( ) ;
644558 data. into_pyarray ( py)
645559 }
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- }
656560}
657561
658562impl < T : Element > PyArray < T , Ix2 > {
@@ -694,16 +598,6 @@ impl<T: Element> PyArray<T, Ix2> {
694598 Ok ( array)
695599 }
696600 }
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- }
707601}
708602
709603impl < T : Element > PyArray < T , Ix3 > {
@@ -764,16 +658,6 @@ impl<T: Element> PyArray<T, Ix3> {
764658 Ok ( array)
765659 }
766660 }
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- }
777661}
778662
779663impl < T : Element + AsPrimitive < f64 > > PyArray < T , Ix1 > {
@@ -810,13 +694,6 @@ impl<T: Element + AsPrimitive<f64>> PyArray<T, Ix1> {
810694 Bound :: from_owned_ptr ( py, ptr) . downcast_into_unchecked ( )
811695 }
812696 }
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- }
820697}
821698
822699unsafe fn clone_elements < T : Element > ( py : Python < ' _ > , elems : & [ T ] , data_ptr : & mut * mut T ) {
0 commit comments