diff --git a/ivy/data_classes/container/experimental/creation.py b/ivy/data_classes/container/experimental/creation.py index 540162d93e6fe..fc861420bc843 100644 --- a/ivy/data_classes/container/experimental/creation.py +++ b/ivy/data_classes/container/experimental/creation.py @@ -1252,57 +1252,6 @@ def static_unsorted_segment_mean( map_sequences=map_sequences, ) - def static_polyval( - coeffs: ivy.Container, - x: Union[ivy.Container, int, float], - *, - key_chains: Optional[Union[List[str], Dict[str, str]]] = None, - to_apply: bool = True, - prune_unapplied: bool = False, - map_sequences: bool = False, - ) -> ivy.Container: - r""" - ivy.Container static method variant of ivy.polyval. This method simply wraps the - function, and so the docstring for ivy.polyval also applies to this method with - minimal changes. - - Evaluate and return a polynomial at specific given values. - - Parameters - ---------- - coeffs - Polynomial coefficients (including zero) from highest degree - to constant term. - x - The value of the indeterminate variable at which to evaluate the polynomial. - key_chains - The key-chains to apply or not apply the method to. Default is ``None``. - to_apply - If True, the method will be applied to key_chains, otherwise key_chains - will be skipped. Default is ``True``. - prune_unapplied - Whether to prune key_chains for which the function was not applied. - Default is ``False``. - map_sequences - Whether to also map method to sequences (lists, tuples). - Default is ``False``. - - Returns - ------- - ret - Output container containing simplified result of substituting x in the - coefficients - final value of polynomial. - """ - return ContainerBase.cont_multi_map_in_function( - "polyval", - coeffs, - x, - key_chains=key_chains, - to_apply=to_apply, - prune_unapplied=prune_unapplied, - map_sequences=map_sequences, - ) - def unsorted_segment_mean( self: ivy.Container, segment_ids: Union[ivy.Array, ivy.Container], @@ -1359,6 +1308,58 @@ def unsorted_segment_mean( num_segments, ) + @staticmethod + def static_polyval( + coeffs: ivy.Container, + x: Union[ivy.Container, int, float], + *, + key_chains: Optional[Union[List[str], Dict[str, str]]] = None, + to_apply: bool = True, + prune_unapplied: bool = False, + map_sequences: bool = False, + ) -> ivy.Container: + r""" + ivy.Container static method variant of ivy.polyval. This method simply wraps the + function, and so the docstring for ivy.polyval also applies to this method with + minimal changes. + + Evaluate and return a polynomial at specific given values. + + Parameters + ---------- + coeffs + Polynomial coefficients (including zero) from highest degree + to constant term. + x + The value of the indeterminate variable at which to evaluate the polynomial. + key_chains + The key-chains to apply or not apply the method to. Default is ``None``. + to_apply + If True, the method will be applied to key_chains, otherwise key_chains + will be skipped. Default is ``True``. + prune_unapplied + Whether to prune key_chains for which the function was not applied. + Default is ``False``. + map_sequences + Whether to also map method to sequences (lists, tuples). + Default is ``False``. + + Returns + ------- + ret + Output container containing simplified result of substituting x in the + coefficients - final value of polynomial. + """ + return ContainerBase.cont_multi_map_in_function( + "polyval", + coeffs, + x, + key_chains=key_chains, + to_apply=to_apply, + prune_unapplied=prune_unapplied, + map_sequences=map_sequences, + ) + def polyval( self: ivy.Container, coeffs: ivy.Container, @@ -1388,4 +1389,4 @@ def polyval( Output container containing simplified result of substituting x in the coefficients - final value of polynomial. """ - return self.static_polyval(self, coeffs, x) + return self.static_polyval(coeffs, x)