Quantcast
Channel: First steps - JuliaLang
Browsing all 2795 articles
Browse latest View live

Populate a Dataframe from an array

@Luigi_Bottecchia wrote: Hi all! I’m learning Julia and these are my first steps. I have a struct that looks like this: struct Region elements::Array{res_tech} demand::Matrix{Float64} end where...

View Article


MNIST dataframe build with my own images

@Mihai-Constantinescu wrote: Hello, I’m looking to build a MNIST type database with my own images in order to train a One-Class CNN. I have the images processed in Julia (Gray, 28x28), I know the...

View Article


Image may be NSFW.
Clik here to view.

Surface plot issues

@Andre_Mello wrote: I’m running into multiple small issues on this kind of surface plot. First I’d like to know if I can make it a bit transparent. alpha seems to only affect the colorbar. I’d like to...

View Article

Type changes based on declaration

@squirrel wrote: Why aren’t F and V below of the same type? How can I write a function that will handle both of them (but not also any generic vector)? using SparseArrays F = Vector{SparseVector}()...

View Article

Help. Some quantum stuff going on in my code. Probably related to scoping

@jovansam wrote: I need help with code below. It is a value function iteration code–probably inefficient–but anyway. I have two vectors TV and v, both declared outside two loops: outer while loop and...

View Article


PyPlot add vertical line

@Luigi_Marongiu wrote: Hello, I would like to add 1. a single vertical line and 2. a series of vertical lines to a PyPlot chart. I have, let’s say, an x value of 38, how do I plot a vertical line on...

View Article

Image may be NSFW.
Clik here to view.

How to get the full output from python using PyCall

@zwwi wrote: Hello, I’m trying to use the iminuit package from python. However, I do not know whether it is possible to get all the output from python. Here is some simple code in python: from iminuit...

View Article

Addprocs gives connection refused to a docker container on raspberry pi

@rbontekoe wrote: I have a docker container running on my Ubuntu 18.04 laptop and a docker container on my Raspberry Pi 3+. Julia is installed the same on both containers...

View Article


Vecnorm Error

@JP_Nieto wrote: I have this code that must be from an old version function column_norms(X, i) M = size(X)[2] X_diff = X .- X[:, i] norm_vector = [vecnorm(X_diff[:, k]) for k=1:M] norm_vector[i] =...

View Article


Return outer function in do block

@jamblejoe wrote: Is it possible to return an outer function from a do block, e.g. the following code f(x) = map(x) do y; if y==1; return -1; end; x *=2; end f([1,2]) evaluates to 2-element...

View Article

Make is running forever

@the_daemon_lord wrote: Greetings! I wanted to build Julia from scratch so I cloned the Julia repo today and ran make. It has been Generating precompile statements... for 10+ hours now. Is it normal...

View Article

Going from python to Julia

@evcon131 wrote: I really want to learn Julia to replace what I do in python. I was trying to create some basic things and kept getting errors I couldn’t resolve. This is an example of what I do in...

View Article

Strange behaviour using hcat with arrays obtained from arraysplit

@ceysa75 wrote: Hi all, I experience a strange behaviour using hcat with arrays obtained from arraysplit (DSP package). My issue is explained in the code snippet below: using DSP a = 1:10 q =...

View Article


Including multi-threading functionality in a package

@joshuanunn wrote: Hi, first post here. Long time python user, so still learning Julia but enjoying so far. What is the general approach to adding multi-threading support into a Julia package?...

View Article

Include, using, export

@erlebach wrote: Hi, I wish to put experimental code in another file, call “TestFile”, and this file contains a function “TestFunction”. In my Main file called “main.jl”, I wish to access the function...

View Article


Pkg system broken because of LibGit2

@innerlee wrote: either $ julia _ _ _ _(_)_ | Documentation: https://docs.julialang.org (_) | (_) (_) | _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. | | | | | | |/ _` | | | | |_| | | | (_| |...

View Article

Strange behavior in system of ODEs

@erlebach wrote: (topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) Posts: 1 Participants: 1 Read full topic

View Article


SharedArray of Measurement type

@Hossein_Haghi wrote: I am trying to put the the output (just one data point) of the solution of an ODE that is solved with uncertainty (measrument.jl) multiple times with different initial conditions...

View Article

How to compute the correlation between elements in an array of arrays?

@zxjroger wrote: Suppose that I have the following array of vectors. temp = Matrix{Vector{Float64}}(undef, 3, 1000) for i = 1:3 for j = 1:1000 temp[i,j] = rand(10) end end Now I want to compute the...

View Article

Track variables within DifferentialEquations.jl function

@erlebach wrote: Hi, I have a simple function to solve: using DifferejntialEquations, Plots, BenchmarkTools var = [] function coupledd!(du, u, p, t) α, β, D1, D2 = p c1, c2 = u dc1 = α*c1 + D1 *...

View Article
Browsing all 2795 articles
Browse latest View live