@@ -213,9 +213,10 @@ module stdlib_experimental_stats
213213 #:for k1, t1 in RC_KINDS_TYPES
214214 #:for rank in RANKS
215215 #:set RName = rname("moment_all",rank, t1, k1)
216- module function ${RName}$(x, order, mask) result(res)
216+ module function ${RName}$(x, order, center, mask) result(res)
217217 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
218218 integer, intent(in) :: order
219+ ${t1}$, intent(in), optional :: center
219220 logical, intent(in), optional :: mask
220221 ${t1}$ :: res
221222 end function ${RName}$
@@ -225,9 +226,10 @@ module stdlib_experimental_stats
225226 #:for k1, t1 in INT_KINDS_TYPES
226227 #:for rank in RANKS
227228 #:set RName = rname("moment_all",rank, t1, k1, 'dp')
228- module function ${RName}$(x, order, mask) result(res)
229+ module function ${RName}$(x, order, center, mask) result(res)
229230 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
230231 integer, intent(in) :: order
232+ real(dp), intent(in), optional :: center
231233 logical, intent(in), optional :: mask
232234 real(dp) :: res
233235 end function ${RName}$
@@ -237,10 +239,11 @@ module stdlib_experimental_stats
237239 #:for k1, t1 in RC_KINDS_TYPES
238240 #:for rank in RANKS
239241 #:set RName = rname("moment",rank, t1, k1)
240- module function ${RName}$(x, order, dim, mask) result(res)
242+ module function ${RName}$(x, order, center, dim, mask) result(res)
241243 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
242244 integer, intent(in) :: order
243245 integer, intent(in) :: dim
246+ ${t1}$, intent(in), optional :: center${reduced_shape('x', rank, 'dim')}$
244247 logical, intent(in), optional :: mask
245248 ${t1}$ :: res${reduced_shape('x', rank, 'dim')}$
246249 end function ${RName}$
@@ -250,10 +253,11 @@ module stdlib_experimental_stats
250253 #:for k1, t1 in INT_KINDS_TYPES
251254 #:for rank in RANKS
252255 #:set RName = rname("moment",rank, t1, k1, 'dp')
253- module function ${RName}$(x, order, dim, mask) result(res)
256+ module function ${RName}$(x, order, center, dim, mask) result(res)
254257 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
255258 integer, intent(in) :: order
256259 integer, intent(in) :: dim
260+ real(dp),intent(in), optional :: center${reduced_shape('x', rank, 'dim')}$
257261 logical, intent(in), optional :: mask
258262 real(dp) :: res${reduced_shape('x', rank, 'dim')}$
259263 end function ${RName}$
@@ -263,9 +267,10 @@ module stdlib_experimental_stats
263267 #:for k1, t1 in RC_KINDS_TYPES
264268 #:for rank in RANKS
265269 #:set RName = rname("moment_mask_all",rank, t1, k1)
266- module function ${RName}$(x, order, mask) result(res)
270+ module function ${RName}$(x, order, center, mask) result(res)
267271 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
268272 integer, intent(in) :: order
273+ ${t1}$, intent(in), optional :: center
269274 logical, intent(in) :: mask${ranksuffix(rank)}$
270275 ${t1}$ :: res
271276 end function ${RName}$
@@ -275,9 +280,10 @@ module stdlib_experimental_stats
275280 #:for k1, t1 in INT_KINDS_TYPES
276281 #:for rank in RANKS
277282 #:set RName = rname("moment_mask_all",rank, t1, k1, 'dp')
278- module function ${RName}$(x, order, mask) result(res)
283+ module function ${RName}$(x, order, center, mask) result(res)
279284 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
280285 integer, intent(in) :: order
286+ real(dp),intent(in), optional :: center
281287 logical, intent(in) :: mask${ranksuffix(rank)}$
282288 real(dp) :: res
283289 end function ${RName}$
@@ -287,10 +293,11 @@ module stdlib_experimental_stats
287293 #:for k1, t1 in RC_KINDS_TYPES
288294 #:for rank in RANKS
289295 #:set RName = rname("moment_mask",rank, t1, k1)
290- module function ${RName}$(x, order, dim, mask) result(res)
296+ module function ${RName}$(x, order, center, dim, mask) result(res)
291297 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
292298 integer, intent(in) :: order
293299 integer, intent(in) :: dim
300+ ${t1}$, intent(in), optional :: center${reduced_shape('x', rank, 'dim')}$
294301 logical, intent(in) :: mask${ranksuffix(rank)}$
295302 ${t1}$ :: res${reduced_shape('x', rank, 'dim')}$
296303 end function ${RName}$
@@ -300,10 +307,11 @@ module stdlib_experimental_stats
300307 #:for k1, t1 in INT_KINDS_TYPES
301308 #:for rank in RANKS
302309 #:set RName = rname("moment_mask",rank, t1, k1, 'dp')
303- module function ${RName}$(x, order, dim, mask) result(res)
310+ module function ${RName}$(x, order, center, dim, mask) result(res)
304311 ${t1}$, intent(in) :: x${ranksuffix(rank)}$
305312 integer, intent(in) :: order
306313 integer, intent(in) :: dim
314+ real(dp), intent(in), optional :: center${reduced_shape('x', rank, 'dim')}$
307315 logical, intent(in) :: mask${ranksuffix(rank)}$
308316 real(dp) :: res${reduced_shape('x', rank, 'dim')}$
309317 end function ${RName}$
0 commit comments