SciPy.jl

Julia interface for SciPy
Author AtsushiSakai
Popularity
26 Stars
Updated Last
12 Months Ago
Started In
May 2020

SciPy.jl

Build Status Stable Dev version pkgeval deps

drawing

SciPy.jl is a Julia interface for SciPy using PyCall.jl.

You can use many useful scientific functions of SciPy from Julia codes.

Requirements

Julia 1.6 or higher.

Install

using Pkg; Pkg.add("SciPy")

and then just import it with using SciPy.

If you want to use latest development code:

import Pkg; Pkg.add(Pkg.PackageSpec(name="SciPy", rev="master"))

What to do if installation failed?

Read an error message you get carefully. Since SciPy.jl depends on PyCall.jl to call Python functionalities from Julia, we also recommend to read Specifying the Python version section of PyCall.jl.

See also this instruction_1 and instruction_2 in this issue

Example

using SciPy
using PyPlot # Pkg.add("PyPlot")

points1 = rand(15, 2)
points2 = rand(15, 2)
figure(figsize=(6, 6))
plot(points1[:, 1], points1[:, 2], "xk", markersize=14)
plot(points2[:, 1], points2[:, 2], "og", markersize=14)
kd_tree1 = spatial.KDTree(points1)
kd_tree2 = spatial.KDTree(points2)
indexes = kd_tree1.query_ball_tree(kd_tree2, r=0.2)
for i in 1:length(indexes)
    for j in indexes[i]
        plot([points1[i, 1], points2[j+1, 1]], [points1[i, 2], points2[j+1, 2]], "-r")
    end
end

Documentation

You can check latest documentation here:

Maintainers

Used By Packages