From 2d476bb20cf57c60ae18c23bfa6c035071e61350 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 3 Oct 2024 09:41:05 +0000 Subject: [PATCH] build based on 0361269 --- dev/.documenter-siteinfo.json | 2 +- dev/Parallel/index.html | 6 +++--- dev/RBase/index.html | 18 +++++++++--------- dev/Slope/index.html | 4 ++-- dev/Statistics/index.html | 10 +++++----- dev/index.html | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 19b3804..aeb12dc 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-03T09:31:34","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-03T09:41:02","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/Parallel/index.html b/dev/Parallel/index.html index 43a8a96..3fc6e20 100644 --- a/dev/Parallel/index.html +++ b/dev/Parallel/index.html @@ -6,7 +6,7 @@ # get_clusters() @time par_map(f, 1:10) -@time map(f, 1:10)source
Ipaper.par_mapslicesFunction
par_mapslices(f, A::AbstractArray{<:Real,N}, args...; dims=N, kw...)

Arguments

  • dims: the dimension apply f

@seealso mapslices

Example

using Ipaper
+@time map(f, 1:10)
source
Ipaper.par_mapslicesFunction
par_mapslices(f, A::AbstractArray{<:Real,N}, args...; dims=N, kw...)

Arguments

  • dims: the dimension apply f

@seealso mapslices

Example

using Ipaper
 using Distributions
 
 A = rand(100, 100, 30, 4)
@@ -15,6 +15,6 @@
 par_mapslices(mean, A)
 
 # @time r = mapslices(slope_mk, A; dims=3);
-# @time r_par = par_mapslices(slope_mk, A; dims=3); # 5X faster

TODO: par_mapslices is low efficiency

source
Ipaper.isCurrentWorkerFunction
isCurrentWorker() -> Bool
+# @time r_par = par_mapslices(slope_mk, A; dims=3); # 5X faster

TODO: par_mapslices is low efficiency

source
Ipaper.isCurrentWorkerFunction
isCurrentWorker() -> Bool
 isCurrentWorker(i) -> Any
-

Example

!isCurrentWorker(i) && continue
source
+

Example

!isCurrentWorker(i) && continue
source diff --git a/dev/RBase/index.html b/dev/RBase/index.html index 3dce3b4..f4db1bf 100644 --- a/dev/RBase/index.html +++ b/dev/RBase/index.html @@ -1,22 +1,22 @@ R Base · Ipaper.jl

R Base

Strings

Ipaper.str_extractFunction
str_extract(x::AbstractString, pattern::AbstractString)
-str_extract(x::Vector{<:AbstractString}, pattern::AbstractString)
source
Ipaper.str_extract_allFunction
str_extract_all(
     x::AbstractString,
     pattern::Union{Regex, AbstractString}
 ) -> Vector{SubString{String}}
-
source
Ipaper.str_replaceFunction
str_replace(x::AbstractString, pattern::AbstractString, replacement::AbstractString = "")
source
Ipaper.str_replaceFunction
str_replace(x::AbstractString, pattern::AbstractString, replacement::AbstractString = "")
source
Ipaper.greplFunction
grep(x::Union{AbstractString,Vector{<:AbstractString}},
     pattern::AbstractString)::AbstractArray{Int,1}
 grepl(x::Vector{<:AbstractString}, pattern::AbstractString)::AbstractArray{Bool,1}
-grepl(x::AbstractString, pattern::AbstractString)
source

Plots

Ipaper.merge_pdfFunction
merge_pdf("*.pdf", output="Plot.pdf")

Please install pdftk first. On Linux, sudo apt install pdftk-java.

merge multiple pdf files by pdftk

source

cmd

Ipaper.dirFunction
dir(path = ".", pattern = ""; full_names = true, include_dirs = false, recursive = false)

Arguments:

  • path
  • pattern
  • full_names
  • include_dirs
  • recursive

Example

dir("src", "\.jl$")
source

Plots

Ipaper.merge_pdfFunction
merge_pdf("*.pdf", output="Plot.pdf")

Please install pdftk first. On Linux, sudo apt install pdftk-java.

merge multiple pdf files by pdftk

source

cmd

Ipaper.dirFunction
dir(path = ".", pattern = ""; full_names = true, include_dirs = false, recursive = false)

Arguments:

  • path
  • pattern
  • full_names
  • include_dirs
  • recursive

Example

dir("src", "\.jl$")
source
Ipaper.writelinesFunction
writelines(
     x::AbstractVector{<:AbstractString},
     f::AbstractString;
     mode,
     eof
 )
-

Arguments

  • mode:

Mode Description Keywords –––– ––––––––––– ––––––––––––––––––––––––– r read none w write write = true r+ read, write read = true, write = true w+ read, write read = true, write = true

@seealso readlines

! x 需要是string,不然文件错误

source

R base

Ipaper.duplicatedFunction
duplicated(x::Vector{<:Real})
x = [1, 2, 3, 4, 1]
+

Arguments

  • mode:

Mode Description Keywords –––– ––––––––––– ––––––––––––––––––––––––– r read none w write write = true r+ read, write read = true, write = true w+ read, write read = true, write = true

@seealso readlines

! x 需要是string,不然文件错误

source

R base

Ipaper.duplicatedFunction
duplicated(x::Vector{<:Real})
x = [1, 2, 3, 4, 1]
 duplicated(x)
-# [0, 0, 0, 0, 1]
source
Ipaper.listFunction
list(keys::Vector{Symbol}, values)
-list(keys::Vector{<:AbstractString}, values)

Examples

list([:dw, :betaw, :swmax, :a, :c, :kh, :uh]
source
Ipaper.listFunction
list(keys::Vector{Symbol}, values)
+list(keys::Vector{<:AbstractString}, values)

Examples

list([:dw, :betaw, :swmax, :a, :c, :kh, :uh]
source
Ipaper.match2Function
match2(x, y)

Examples

## original version
 mds = [1, 4, 3, 5]
 md = [1, 5, 6]
 
@@ -26,14 +26,14 @@
 ## modern version
 x = [1, 2, 3, 3, 4]
 y = [0, 2, 2, 3, 4, 5, 6]
-match2(x, y)

Note: match2 only find the element in y

source

Missing

Missing

Ipaper.drop_missingFunction

drop_missing

drop_missing(
     x::AbstractArray{Union{Missing, T<:Real}}
 ) -> Any
 drop_missing(
     x::AbstractArray{Union{Missing, T<:Real}},
     replacement
 ) -> Any
-
source
Ipaper.to_missingFunction

to_missing(x::AbstractArray{T}, replacement=0)

to_missing(x::AbstractMissArray{T}, replacement=0)

to_missing!(x::AbstractMissArray{T}, replacement=0)

convert replacement to missing

to_missing(x::AbstractArray{T<:Real}) -> Any
+
source
Ipaper.to_missingFunction

to_missing(x::AbstractArray{T}, replacement=0)

to_missing(x::AbstractMissArray{T}, replacement=0)

to_missing!(x::AbstractMissArray{T}, replacement=0)

convert replacement to missing

to_missing(x::AbstractArray{T<:Real}) -> Any
 to_missing(x::AbstractArray{T<:Real}, replacement) -> Any
 

Usage

to_missing(x)
-to_missing(x, replacement)

defined at /home/runner/work/Ipaper.jl/Ipaper.jl/src/missing.jl:49.

source
+to_missing(x, replacement)

defined at /home/runner/work/Ipaper.jl/Ipaper.jl/src/missing.jl:49.

source diff --git a/dev/Slope/index.html b/dev/Slope/index.html index b49d8f5..ed69db2 100644 --- a/dev/Slope/index.html +++ b/dev/Slope/index.html @@ -2,6 +2,6 @@ Slope · Ipaper.jl

Slope

Ipaper.slope_mkFunction
slope_mk(y::AbstractVector, x::AbstractVector=1:length(y); ci=0.95)

Arguments

  • y: numeric vector
  • x: (optional) numeric vector
  • ci: critical value of autocorrelation

Return

  • Z0 : The original (non corrected) Mann-Kendall test Z statistic.

  • pval0 : The original (non corrected) Mann-Kendall test p-value

  • Z : The new Z statistic after applying the correction

  • pval : Corrected p-value after accounting for serial autocorrelation N/n*s Value of the correction factor, representing the quotient of the number of samples N divided by the effective sample size n*s

  • slp : Sen slope, The slope of the (linear) trend according to Sen test. slp is significant, if pval < alpha.

References

  1. Hipel, K.W. and McLeod, A.I. (1994), Time Series Modelling of Water Resources and Environmental Systems. New York: Elsevier Science.

  2. Libiseller, C. and Grimvall, A., (2002), Performance of partial Mann-Kendall tests for trend detection in the presence of covariates. Environmetrics, 13, 71–84, doi:10.1002/env.507.

Example

slope_mk([4.81, 4.17, 4.41, 3.59, 5.87, 3.83, 6.03, 4.89, 4.32, 4.69])
 
 A = rand(100, 100, 30, 4)
-@time r = mapslices(slope_mk, A; dims=3);
source
Ipaper.slope_pFunction
slope_p(y::AbstractVector, x::AbstractVector=1:length(y))

Reference

  1. https://zhuanlan.zhihu.com/p/642186978

Example

x = [1, 2, 3, 4, 5];
+@time r = mapslices(slope_mk, A; dims=3);
source
Ipaper.slope_pFunction
slope_p(y::AbstractVector, x::AbstractVector=1:length(y))

Reference

  1. https://zhuanlan.zhihu.com/p/642186978

Example

x = [1, 2, 3, 4, 5];
 y = [2, 4, 5, 4, 6];
-slope_p(y)
source
+slope_p(y)source diff --git a/dev/Statistics/index.html b/dev/Statistics/index.html index c6cd472..af39092 100644 --- a/dev/Statistics/index.html +++ b/dev/Statistics/index.html @@ -1,5 +1,5 @@ -Statistics · Ipaper.jl

Quantile

Ipaper.NanQuantile_lowFunction
NanQuantile_low(A::AbstractArray{T,N};
+Statistics · Ipaper.jl        
         
 

Quantile

Ipaper.NanQuantile_lowFunction
NanQuantile_low(A::AbstractArray{T,N};
     probs::Vector=[0, 0.25, 0.5, 0.75, 1], dims::Integer=N, na_rm::Bool=true, dtype=nothing) where {T<:Real,N}

NanQuantile_low(na_rm=rue) is 3~4 times faster than _nanquantile(na_rm=true)

Examples

using Test
 
 dates = make_date(2010, 1, 1):Day(1):make_date(2010, 12, 31)
@@ -16,7 +16,7 @@
 
 @test r2_0 == r2_1
 @test r2_0 == 20
-@test arr2 == arr
source

Statistics

Ipaper.movmeanFunction
movmean(x::AbstractArray; ...) -> AbstractVector
+@test arr2 == arr
source

Statistics

Ipaper.movmeanFunction
movmean(x::AbstractArray; ...) -> AbstractVector
 movmean(
     x::AbstractArray,
     halfwin::Integer;
@@ -24,10 +24,10 @@
     fun,
     FT
 ) -> AbstractVector
-

moving mean average

source

apply

Ipaper.agg_timeFunction
agg_time(A::AbstractArray{T,3}, by::Vector; parallel=true, progress=false, 
+

moving mean average

source

apply

Ipaper.agg_timeFunction
agg_time(A::AbstractArray{T,3}, by::Vector; parallel=true, progress=false, 
     fun=mean) where {T<:Real}
 agg_time(A::AbstractArray{T,3}; fact::Int=2, parallel=true, progress=false, 
-  fun=mean) where {T<:Real}
source
Missing docstring.

Missing docstring for agg. Check Documenter's build log for details.

Ipaper.applyFunction
apply(A::AbstractArray; ...) -> Any
+  fun=mean) where {T<:Real}
source
Missing docstring.

Missing docstring for agg. Check Documenter's build log for details.

Ipaper.applyFunction
apply(A::AbstractArray; ...) -> Any
 apply(
     A::AbstractArray,
     dims_by,
@@ -74,4 +74,4 @@
 
 res = apply(x, 3; by=years, fun=mean, combine=true)
 
-apply(x, 3; by = month.(dates), fun=slope_mk)
source
+apply(x, 3; by = month.(dates), fun=slope_mk)
source
diff --git a/dev/index.html b/dev/index.html index 42c187f..71ab9e4 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Introduction · Ipaper.jl
+Pkg.add(url="https://github.com/jl-spatial/Ipaper.jl")