numerical_function_spaces.orlicz_spaces ======================================= .. py:module:: numerical_function_spaces.orlicz_spaces Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/numerical_function_spaces/orlicz_spaces/conjugate/index /autoapi/numerical_function_spaces/orlicz_spaces/norms/index /autoapi/numerical_function_spaces/orlicz_spaces/orlicz_functions/index /autoapi/numerical_function_spaces/orlicz_spaces/plots/index Attributes ---------- .. autoapisummary:: numerical_function_spaces.orlicz_spaces.__version__ Functions --------- .. autoapisummary:: numerical_function_spaces.orlicz_spaces.kappa numerical_function_spaces.orlicz_spaces.p_Amemiya_norm numerical_function_spaces.orlicz_spaces.Orlicz_norm_with_stars numerical_function_spaces.orlicz_spaces.Luxemburg_norm_with_stars numerical_function_spaces.orlicz_spaces.p_Amemiya_norm_with_stars numerical_function_spaces.orlicz_spaces.p_Amemiya_norm_with_stars_by_decimal numerical_function_spaces.orlicz_spaces.Orlicz_function_u_2 numerical_function_spaces.orlicz_spaces.Orlicz_function_u_2_u_3 numerical_function_spaces.orlicz_spaces.Orlicz_function_L_1_sum_L_inf numerical_function_spaces.orlicz_spaces.Orlicz_function_L_1_cap_L_inf numerical_function_spaces.orlicz_spaces.Orlicz_function_L_1 numerical_function_spaces.orlicz_spaces.Orlicz_function_L_inf numerical_function_spaces.orlicz_spaces.plot_save numerical_function_spaces.orlicz_spaces.description_for_plot numerical_function_spaces.orlicz_spaces.plot_p_norms numerical_function_spaces.orlicz_spaces.plot_kappa numerical_function_spaces.orlicz_spaces.plot_Phi_p_plus_Psi numerical_function_spaces.orlicz_spaces.plot_Phi numerical_function_spaces.orlicz_spaces.array_for_alpha numerical_function_spaces.orlicz_spaces.plot_alpha numerical_function_spaces.orlicz_spaces.array_for_tau numerical_function_spaces.orlicz_spaces.plot_tau numerical_function_spaces.orlicz_spaces.right_side_derivative numerical_function_spaces.orlicz_spaces.conjugate_function Package Contents ---------------- .. py:data:: __version__ .. py:function:: kappa(Orlicz_function, x, k, p_norm) Calculates the kappa value for a given set of parameters. :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k: must be positive. :type k: float :param p_norm: The p-norm to be calculated. :type p_norm: float :returns: **The kappa value** :rtype: np.float64. :raises ValueError: If x[1, :] contains non-positive values.: .. rubric:: Examples >>> x = np.array([[1],[1]]) >>> def Orlicz_function(u): ... return u ... >>> kappa(Orlicz_function, x=x, k=1, p_norm=1) np.float64(2.0) .. py:function:: p_Amemiya_norm(Orlicz_function, x: numpy.ndarray, p_norm: float) Calculates the p_Amemiya norm for a given set of parameters. :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :returns: **value of the p-Amemiya norm** :rtype: np.float64. :raises ValueError: If x[1, :] contains non-positive values.: .. rubric:: Examples >>> x = np.array([[1],[1]]) >>> def Orlicz_function(u): ... return u ... >>> p_Amemiya_norm(Orlicz_function, x=x, p_norm=1) np.float64(1.0) .. py:function:: Orlicz_norm_with_stars(Orlicz_function, x: numpy.ndarray, k_min: float = 1e-06, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Computes the Orlicz norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters as p_Amimiya norm for p_norm=1 :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k_min: The minimum value of the k domain, by default 0.000001. :type k_min: float, optional :param k_max: The maximum value of the k domain, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default, False. :type show_progress: bool, optional :rtype: - A tuple containing the value of the Orlicz norm, k^{*}, k^{**}. .. rubric:: Examples >>> x = np.array([[1],[2]]) >>> def Orlicz_function(u): ... return np.where(u <= 1, 0, u - 1) ... >>> Orlicz_norm_with_stars(Orlicz_function, x) (np.float64(1.000008302431002), np.float64(1.0000083024999329), np.float64(1.0000083024999329)) .. py:function:: Luxemburg_norm_with_stars(Orlicz_function, x: numpy.ndarray, k_min: float = 1e-06, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Computes the Luxemburg norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters as p_Amimiya norm for p_norm=np.inf :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k_min: The minimum value of the k domain, by default 0.000001. :type k_min: float, optional :param k_max: The maximum value of the k domain, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default, False. :type show_progress: bool, optional :rtype: - A tuple containing the value of the Luxemburg norm, k^{*}, k^{**}. .. rubric:: Examples >>> x = np.array([[1],[2]]) >>> def Orlicz_function(u): ... return np.where(u <= 1, 0, u - 1) ... >>> Luxemburg_norm_with_stars(Orlicz_function, x) (np.float64(0.666712308582787), np.float64(1.4998973127189956), np.float64(1.4998973127189956)) .. py:function:: p_Amemiya_norm_with_stars(Orlicz_function, x: numpy.ndarray, p_norm: float, k_min: float = 1e-06, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Computes the p-Amemiya norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param k_min: The minimum value of the k domain, by default 0.000001. :type k_min: float, optional :param k_max: The maximum value of the k domain, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default, False. :type show_progress: bool, optional :rtype: A tuple containing the value of the p-Amemiya norm, k^{*}, k^{**}. .. note:: Precision problem with k^{*} false less than k^{**} for Phi = max(u,2u-1), x=chi_(0,3), p=20. Too small accuracy. Problem eliminated in slower function p_Amemiya_norm_with_stars_by_decimal(). .. rubric:: Examples >>> x = np.array([[1],[1]]) >>> def Orlicz_function(u): ... return u**2 ... >>> p_Amemiya_norm_with_stars(Orlicz_function, x=x, p_norm=1) (np.float64(2.000000000068931), np.float64(1.0000083024999067), np.float64(1.0000083024999067)) .. py:function:: p_Amemiya_norm_with_stars_by_decimal(Orlicz_function, x: numpy.ndarray, p_norm: decimal.Decimal, k_min: decimal.Decimal = dc.Decimal(1) / 100000, k_max: decimal.Decimal = dc.Decimal(100), dk: decimal.Decimal = None, len_domain_k: int = 1000, show_progress: bool = False) -> tuple Computes the p-Amemiya norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated (in decimal form). :type p_norm: float :param k_min: The minimum value of the k domain in decimal form, by default 1/100000. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain in decimal form, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :rtype: A tuple containing the minimum value of the p-Amemiya norm, k^{*}, k^{**}, kappa_domain, and kappa_values. :raises - ValueError: If any value in x[1, :] is less than or equal to 0.: .. rubric:: Examples >>> x = np.array([[1], [2]]) >>> def Orlicz_function(u): ... return np.where(u <= 1, u, dc.Decimal(np.inf)) ... >>> dc.getcontext().prec = 20 >>> p_Amemiya_norm_with_stars_by_decimal(Orlicz_function, x=x, p_norm=dc.Decimal(np.inf), ... k_min = dc.Decimal(4)/10, ... k_max = dc.Decimal(11)/10, ... dk = dc.Decimal(1)/100) ... (Decimal('1.9999999999999999999'), Decimal('0.50'), Decimal('1.00')) .. py:function:: Orlicz_function_u_2(u) Phi(u) = u^2 .. py:function:: Orlicz_function_u_2_u_3(u) Phi(u) = u^2 if u<=1 else u^3 .. py:function:: Orlicz_function_L_1_sum_L_inf(u) Phi(u) = 0 if u<=1 else u-1 .. py:function:: Orlicz_function_L_1_cap_L_inf(u) Phi(u) = u if u<=1 else np.inf .. py:function:: Orlicz_function_L_1(u) Phi(u) = u .. py:function:: Orlicz_function_L_inf(u) Phi(u) = 0 if u<=1 else np.inf .. py:function:: plot_save(name: str = 'plot', p_norm: float = '') Saves the current figure in different formats (PNG, SVG, PDF) with a given name and p_norm. :param name: The name to be used for the saved files. Default is 'plot'. :type name: str :param p_norm: The p-norm value to be included in the file names. Default is an empty string. :type p_norm: float :returns: **The function saves the figure in folder 'plots'** :rtype: None .. py:function:: description_for_plot(p_norm: float) Set description for plots :param p_norm: The p-norm value to be included in plot description :type p_norm: float .. py:function:: plot_p_norms(Orlicz_function, x, p_min=1, p_max=50, dp=2, attach_inf=False, show_progress=False, figsize: tuple = (5, 4), show: bool = False, save: bool = False) Plot the p-norms of a given signal x for a range of p values. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_min: The minimum value of the p domain. Default is 1. :type p_min: float greater or equal 1 :param p_max: The maximum value of the p domain. Default is 50. :type p_max: float smaller than infinity :param dp: The step of the p domain. Default is 2. :type dp: positive float :param attach_inf: Whether to attach infinity norm to the plot. Default is False. :type attach_inf: bool :param show_progress: Whether to show a progress bar during computation. Default is False. :type show_progress: bool :param figsize: The size of the plot. Default is (5, 4). :type figsize: tuple :param show: Whether to show the plot. Default is False. :type show: bool :param save: Whether to save the plot in different formats (PNG, SVG, PDF) in the 'plots' folder. Default is False. :type save: bool :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: plot_kappa(Orlicz_function, x: numpy.ndarray, p_norm: float, k_min: float = 0.01, k_max: float = 10, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False, figsize: tuple = (5, 4), show: bool = False, save: bool = False, save_name: str = None, title: str = None) Plot kappa() function and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :param figsize: Size of plots, by default (5,4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :param save_name: Name for saved plots, by default 'kappa_{p_norm}.pdf' :type save_name: string, optional :param title: Title for plots, by default 'kappa_{p,x}(k)' :type title: string, optional :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: plot_Phi_p_plus_Psi(Orlicz_function, u_max: float, du: float, max_u_on_plots: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, figsize: tuple = (9, 3), show: bool = False, save: bool = False) Plot Orlicz_function, right side derivative and conjugate function on one plot and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz function :type du: float :param u_max: Right limit of u_domain for Orlicz function (bigger u_max may improve Psi accuracy) :type u_max: float :param max_u_on_plots: May be the same or smaller to u_max :type max_u_on_plots: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (if given must use the same u_max and du as given for plot) :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (if given must use the same u_max and du as given for plot) :param figsize: Size of plots, by default (5,4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: plot_Phi(Orlicz_function, u_max: float, du: float, figsize: tuple = (5, 4), show: bool = False, save: bool = False) Plot Orlicz_function, right side derivative and conjugate function on one plot and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param figsize: Size of plots, by default (5,4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: array_for_alpha(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Calculate domain and values of alpha() function. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :rtype: Two numpy arrays, first for alpha domain, second for alpha values. .. py:function:: plot_alpha(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show: bool = False, save: bool = False, show_progress: bool = False, save_name: str = None, title: str = None, figsize: tuple = (5, 4)) Plot kappa() function and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :param figsize: Size of plots, by default (5, 4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :param save_name: Name for saved plots, by default 'kappa_{p_norm}.pdf' :type save_name: string, optional :param title: Title for plots, by default 'kappa_{p,x}(k)' :type title: string, optional .. note:: In this function there are no warnings about exceeding k^{*} and k^{**} ranges :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: array_for_tau(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Calculate domain and values of tau() function. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :rtype: Two numpy arrays, first for tau domain, second for tau values. .. py:function:: plot_tau(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show: bool = False, save: bool = False, show_progress: bool = False, save_name: str = None, title: str = None, figsize: tuple = (5, 4)) Plot tau() function and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :param figsize: Size of plots, by default (5, 4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :param save_name: Name for saved plots, by default 'kappa_{p_norm}.pdf' :type save_name: string, optional :param title: Title for plots, by default 'kappa_{p,x}(k)' :type title: string, optional .. note:: In this function there are no warnings about exceeding k^{*} and k^{**} ranges :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: right_side_derivative(Orlicz_function, u_max: float, du: float, show_progress: bool = False) Calculates the right-side derivative of the Orlicz function for a given set of parameters. :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param u_max: The upper bound of the u domain. :type u_max: float :param du: The step size for the u domain. :type du: float :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :returns: The right-side derivative of the Orlicz function evaluated at each point in the domain of Orlicz_function. :rtype: np.ndarray .. rubric:: Examples >>> def Orlicz_function(u): ... return np.where(u <= 1, 0, u ** 2 - 1) ... >>> right_side_derivative(Orlicz_function, u_max=5, du=0.5) array([0. , 0. , 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5]) .. py:function:: conjugate_function(Orlicz_function, u_max, du: float, show_progress: bool = False) Calculates the conjugate function Psi of the Orlicz function for a given set of parameters. :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param u_max: The upper bound of the u domain. :type u_max: float :param du: The step size for the u domain. :type du: float :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :returns: The conjugate function Psi of the Orlicz function evaluated at each point in the domain of Orlicz_function. :rtype: np.ndarray .. rubric:: Examples >>> def Orlicz_function(u): ... return np.where(u <=1, 0, u**2) ... >>> conjugate_function(Orlicz_function, u_max=5, du=0.5) array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 5. ])