Skip to content

Commit a89437c

Browse files
committed
Fix doctests for Julia 1.6.
Fix the doctests to handle a change between Julia 1.5 and 1.6 where one-dimensional arrays like Array{1} and BitArray{1} are displayed in the REPL output as "Vector" and "BitVector".
1 parent 4383abd commit a89437c

File tree

9 files changed

+217
-18
lines changed

9 files changed

+217
-18
lines changed

docs/Manifest.toml

+201-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# This file is machine-generated - editing it directly is not advised
22

3+
[[ArgTools]]
4+
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
5+
6+
[[Artifacts]]
7+
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
8+
39
[[Base64]]
410
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
511

@@ -9,6 +15,12 @@ git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058"
915
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
1016
version = "0.5.10"
1117

18+
[[ChainRulesCore]]
19+
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
20+
git-tree-sha1 = "bdc0937269321858ab2a4f288486cb258b9a0af7"
21+
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
22+
version = "1.3.0"
23+
1224
[[ColorTypes]]
1325
deps = ["FixedPointNumbers", "Random"]
1426
git-tree-sha1 = "4bffea7ed1a9f0f3d1a131bbcd4b925548d75288"
@@ -21,20 +33,51 @@ git-tree-sha1 = "008d6bc68dea6beb6303fdc37188cb557391ebf2"
2133
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
2234
version = "0.12.4"
2335

36+
[[Compat]]
37+
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
38+
git-tree-sha1 = "727e463cfebd0c7b999bbf3e9e7e16f254b94193"
39+
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
40+
version = "3.34.0"
41+
42+
[[CompilerSupportLibraries_jll]]
43+
deps = ["Artifacts", "Libdl"]
44+
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
45+
2446
[[Conda]]
2547
deps = ["JSON", "VersionParsing"]
2648
git-tree-sha1 = "c0647249d785f1d5139c0cc96db8f6b32f7ec416"
2749
uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d"
2850
version = "1.5.0"
2951

52+
[[DataAPI]]
53+
git-tree-sha1 = "ee400abb2298bd13bfc3df1c412ed228061a2385"
54+
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
55+
version = "1.7.0"
56+
57+
[[DataStructures]]
58+
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
59+
git-tree-sha1 = "7d9d316f04214f7efdbb6398d545446e246eff02"
60+
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
61+
version = "0.18.10"
62+
3063
[[Dates]]
3164
deps = ["Printf"]
3265
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
3366

67+
[[DelimitedFiles]]
68+
deps = ["Mmap"]
69+
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
70+
3471
[[Distributed]]
3572
deps = ["Random", "Serialization", "Sockets"]
3673
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
3774

75+
[[Distributions]]
76+
deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
77+
git-tree-sha1 = "a837fdf80f333415b69684ba8e8ae6ba76de6aaa"
78+
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
79+
version = "0.24.18"
80+
3881
[[DocStringExtensions]]
3982
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
4083
git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1"
@@ -53,9 +96,19 @@ git-tree-sha1 = "9b40fd93f54ba5ef9d364981124a8ed389fd634e"
5396
uuid = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
5497
version = "0.1.9"
5598

99+
[[Downloads]]
100+
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
101+
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
102+
56103
[[FileWatching]]
57104
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
58105

106+
[[FillArrays]]
107+
deps = ["LinearAlgebra", "Random", "SparseArrays"]
108+
git-tree-sha1 = "693210145367e7685d8604aee33d9bfb85db8b31"
109+
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
110+
version = "0.11.9"
111+
59112
[[FixedPointNumbers]]
60113
deps = ["Statistics"]
61114
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
@@ -72,27 +125,58 @@ version = "0.1.1"
72125
deps = ["Markdown"]
73126
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
74127

128+
[[JLLWrappers]]
129+
deps = ["Preferences"]
130+
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
131+
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
132+
version = "1.3.0"
133+
75134
[[JSON]]
76135
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
77136
git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
78137
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
79138
version = "0.21.1"
80139

140+
[[LSHFunctions]]
141+
deps = ["Distributions", "LinearAlgebra", "Markdown", "QuadGK", "Random", "SparseArrays"]
142+
path = "/home/kernelmethod/.julia/dev/LSHFunctions.jl"
143+
uuid = "5134c85a-a9db-11e9-340f-8514dff59a31"
144+
version = "0.2.0"
145+
81146
[[LaTeXStrings]]
82147
git-tree-sha1 = "c7aebfecb1a60d59c0fe023a68ec947a208b1e6b"
83148
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
84149
version = "1.2.0"
85150

151+
[[LibCURL]]
152+
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
153+
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
154+
155+
[[LibCURL_jll]]
156+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
157+
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
158+
86159
[[LibGit2]]
160+
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
87161
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
88162

163+
[[LibSSH2_jll]]
164+
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
165+
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
166+
89167
[[Libdl]]
90168
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
91169

92170
[[LinearAlgebra]]
93171
deps = ["Libdl"]
94172
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
95173

174+
[[LogExpFunctions]]
175+
deps = ["DocStringExtensions", "LinearAlgebra"]
176+
git-tree-sha1 = "7bd5f6565d80b6bf753738d2bc40a5dfea072070"
177+
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
178+
version = "0.2.5"
179+
96180
[[Logging]]
97181
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
98182

@@ -106,19 +190,58 @@ version = "0.5.6"
106190
deps = ["Base64"]
107191
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
108192

193+
[[MbedTLS_jll]]
194+
deps = ["Artifacts", "Libdl"]
195+
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
196+
197+
[[Missings]]
198+
deps = ["DataAPI"]
199+
git-tree-sha1 = "2ca267b08821e86c5ef4376cffed98a46c2cb205"
200+
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
201+
version = "1.0.1"
202+
109203
[[Mmap]]
110204
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
111205

206+
[[MozillaCACerts_jll]]
207+
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
208+
209+
[[NetworkOptions]]
210+
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
211+
212+
[[OpenSpecFun_jll]]
213+
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
214+
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
215+
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
216+
version = "0.5.5+0"
217+
218+
[[OrderedCollections]]
219+
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
220+
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
221+
version = "1.4.1"
222+
223+
[[PDMats]]
224+
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
225+
git-tree-sha1 = "4dd403333bcf0909341cfe57ec115152f937d7d8"
226+
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
227+
version = "0.11.1"
228+
112229
[[Parsers]]
113230
deps = ["Dates"]
114231
git-tree-sha1 = "6370b5b3cf2ce5a3d2b6f7ab2dc10f374e4d7d2b"
115232
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
116233
version = "1.0.14"
117234

118235
[[Pkg]]
119-
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Test", "UUIDs"]
236+
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
120237
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
121238

239+
[[Preferences]]
240+
deps = ["TOML"]
241+
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
242+
uuid = "21216c6a-2e73-6563-6e65-726566657250"
243+
version = "1.2.2"
244+
122245
[[Printf]]
123246
deps = ["Unicode"]
124247
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
@@ -135,8 +258,14 @@ git-tree-sha1 = "67dde2482fe1a72ef62ed93f8c239f947638e5a2"
135258
uuid = "d330b81b-6aea-500a-939a-2ce795aea3ee"
136259
version = "2.9.0"
137260

261+
[[QuadGK]]
262+
deps = ["DataStructures", "LinearAlgebra"]
263+
git-tree-sha1 = "12fbe86da16df6679be7521dfb39fbc861e1dc7b"
264+
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
265+
version = "2.4.1"
266+
138267
[[REPL]]
139-
deps = ["InteractiveUtils", "Markdown", "Sockets"]
268+
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
140269
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
141270

142271
[[Random]]
@@ -149,6 +278,18 @@ git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0"
149278
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
150279
version = "0.2.0"
151280

281+
[[Rmath]]
282+
deps = ["Random", "Rmath_jll"]
283+
git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f"
284+
uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
285+
version = "0.7.0"
286+
287+
[[Rmath_jll]]
288+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
289+
git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7"
290+
uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f"
291+
version = "0.3.0+0"
292+
152293
[[SHA]]
153294
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
154295

@@ -161,19 +302,64 @@ version = "0.1.0"
161302
[[Serialization]]
162303
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
163304

305+
[[SharedArrays]]
306+
deps = ["Distributed", "Mmap", "Random", "Serialization"]
307+
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
308+
164309
[[Sockets]]
165310
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
166311

312+
[[SortingAlgorithms]]
313+
deps = ["DataStructures"]
314+
git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508"
315+
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
316+
version = "1.0.1"
317+
167318
[[SparseArrays]]
168319
deps = ["LinearAlgebra", "Random"]
169320
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
170321

322+
[[SpecialFunctions]]
323+
deps = ["ChainRulesCore", "LogExpFunctions", "OpenSpecFun_jll"]
324+
git-tree-sha1 = "a322a9493e49c5f3a10b50df3aedaf1cdb3244b7"
325+
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
326+
version = "1.6.1"
327+
171328
[[Statistics]]
172329
deps = ["LinearAlgebra", "SparseArrays"]
173330
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
174331

332+
[[StatsAPI]]
333+
git-tree-sha1 = "1958272568dc176a1d881acb797beb909c785510"
334+
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
335+
version = "1.0.0"
336+
337+
[[StatsBase]]
338+
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
339+
git-tree-sha1 = "fed1ec1e65749c4d96fc20dd13bea72b55457e62"
340+
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
341+
version = "0.33.9"
342+
343+
[[StatsFuns]]
344+
deps = ["LogExpFunctions", "Rmath", "SpecialFunctions"]
345+
git-tree-sha1 = "30cd8c360c54081f806b1ee14d2eecbef3c04c49"
346+
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
347+
version = "0.9.8"
348+
349+
[[SuiteSparse]]
350+
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
351+
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
352+
353+
[[TOML]]
354+
deps = ["Dates"]
355+
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
356+
357+
[[Tar]]
358+
deps = ["ArgTools", "SHA"]
359+
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
360+
175361
[[Test]]
176-
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
362+
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
177363
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
178364

179365
[[UUIDs]]
@@ -187,3 +373,15 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
187373
git-tree-sha1 = "80229be1f670524750d905f8fc8148e5a8c4537f"
188374
uuid = "81def892-9a0e-5fdd-b105-ffc91e053289"
189375
version = "1.2.0"
376+
377+
[[Zlib_jll]]
378+
deps = ["Libdl"]
379+
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
380+
381+
[[nghttp2_jll]]
382+
deps = ["Artifacts", "Libdl"]
383+
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
384+
385+
[[p7zip_jll]]
386+
deps = ["Artifacts", "Libdl"]
387+
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

docs/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
4+
LSHFunctions = "5134c85a-a9db-11e9-340f-8514dff59a31"
45
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
56

67
[compat]

docs/src/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ julia> data[end,1:end] .= rand(100); # Randomize the last dimension of each poi
1717
julia> hashes = map(x -> hashfn(x), eachcol(data));
1818
1919
julia> unique(hashes)
20-
1-element Array{BitArray{1},1}:
20+
1-element Vector{BitVector}:
2121
[0]
2222
```
2323

docs/src/function_hashing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ julia> μ() = 2π*rand(); # μ samples a random point from [0,2π]
1313
julia> hashfn = MonteCarloHash(cossim, μ, 3);
1414
1515
julia> hashfn(x -> 5x^3 - 2x^2 - 9x + 1)
16-
3-element BitArray{1}:
16+
3-element BitVector:
1717
0
1818
1
1919
1
@@ -75,13 +75,13 @@ julia> μ() = 2π * rand(); # μ samples a random point from [0,2π]
7575
julia> hashfn = MonteCarloHash(L2, μ, 3; volume=2π);
7676
7777
julia> hashfn(cos)
78-
3-element Array{Int32,1}:
78+
3-element Vector{Int32}:
7979
-1
8080
3
8181
0
8282
8383
julia> hashfn(x -> x/(2π))
84-
3-element Array{Int32,1}:
84+
3-element Vector{Int32}:
8585
-1
8686
-2
8787
-1

docs/src/lshfunction_api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ LSHFunctions.jl provides a few common utility functions that you can use across
114114
julia> hashes = hashfn(rand(100));
115115
116116
julia> typeof(hashes)
117-
BitArray{1}
117+
BitVector (alias for BitArray{1})
118118
119119
julia> typeof(hashes[1]) == hashtype(hashfn)
120120
true

docs/src/similarities/cosine.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ julia> n_hashes(hashfn)
7676
julia> hashes = hashfn(randn(4));
7777
7878
julia> typeof(hashes)
79-
BitArray{1}
79+
BitVector (alias for BitArray{1})
8080
8181
julia> length(hashes)
8282
1

0 commit comments

Comments
 (0)