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

Sparse matrix 700x slower than full

Hello, I have a big matrix (20000x20000, Float64) which I build in a for loop. The for loop fills that matrix 2 non-consecutive columns at a time (e.g., in step 5 it may fill columns 3 and 5000, from...

View Article


Nested map

I’d like to apply a function to each element of a nested array. To illustrate julia> arr = [[1,2,3],[4,5,6]] 2-element Array{Array{Int64,1},1}: [1, 2, 3] [4, 5, 6] julia> map(arr) do ls map(ls)...

View Article


Why a symbol starting with a number needs to be between brackets?

For example function dayp(interval = :1day) # errors if interval == :1day return 1 elseif interval == :1week return 7 end end One needs to do: function dayp(interval = :(1day)) ... and then call the...

View Article

Calculating hessian of a NN w.r.t params

How would you calculate a hessian of a Neural Network w.r.t. it’s parameters? For instance, a hessian of the loss function below using Flux: Chain, Dense, σ, crossentropy, params using Zygote model =...

View Article

Array basics

Hi, In Haskell when you declare a function you are expected to say before hand what you expect as input and output for instance [Integers] → Integer. How does one do this is Julia. I am no Haskell...

View Article


Image may be NSFW.
Clik here to view.

Set major and minor ticks

I am using plotly and trying to get my dates showing every month but now it is showing every 2 months. I looked at the documentation and tried various attributes as you can see below to no avail....

View Article

CNN basics

Hi, This is my first question here and I am new to Julia and this is my first big project. So I am very excited. I am trying to use CNN for CSV files. There are 2 features (x and y) and 1 label. Each...

View Article

Is it worth introducing `copy()` into learnxiny?

Many new users use: Learn Julia in Y Minutes New users coming from Matlab/Octave (like myself) may not realize that using = w/ arrays does not create a new copy. a1 = [1:5;] a2 = a1 a2[5] = a2[5] +40...

View Article


InexactError in learnxiny?

The following issue might surprise newcomers to Julia julia> y1 = [1:3;] 3-element Array{Int64,1}: 1 2 3 julia> y1[3] = y1[3] + 5.0 8.0 julia> y1[3] = y1[3] + 4.99 ERROR: InexactError:...

View Article


Image may be NSFW.
Clik here to view.

Open EEG binary file

Hi, I am trying to open an EEG BrainVision binary file, but I have a problem… Please help To open the binary, I am using the solution provided in this discussion by @stevengj (thank you). The data is...

View Article

How to draw a line with an arrow in Plot.jl?

I wonder how to draw a line with an arrow in Plot.jl. The backend I use is GR, but any backend is OK to me. In the case of GnuPlot, it looks like set arrow 1 from 0,9 to 0,-9. Note, I do not mean I...

View Article

Introducing new users to Revise.jl

I remember from myself that I put down Julia about two years ago because I didn’t know about Revise.jl. Only months later, I gave Julia a second shot. I’m not alone in this. I see this pop up time and...

View Article

Image may be NSFW.
Clik here to view.

A few questions on Julia's missing values, and how they compare to Python and R

I have read a lot about how Julia handles missing values: https://docs.julialang.org/en/v1/manual/missing/ julialang.org First-Class Statistical Missing Values Support in Julia 0.7 First-Class...

View Article


Displaying a chess board with Julia

I plan to use julia’s chess.jl and Gtk.jl + ImageView.pl to write a custom chess app for our kids to study puzzles. [ We want to record what the kids did with elapsed time etc for e.g. Polgar’s ~5000...

View Article

How do most people get around (not) compiling?

This is more of a curiosity. Are most people using Julia to create scripts, in-house codes, and open source projects? Is there a significant group of people working with Julia for commercial software...

View Article


Extracting information from https://caps.fool.com/Ticker/MSFT.aspx

I am trying to extract information from Caps run by Fool. However, using Gumbo and Cascadia, the html page appears to contain no useful information (and certainly not what I am after in a direct way)....

View Article

Plots, VegaLite, Gadfly and Makie. What is the difference between the Julia...

What are the main differences between these packages and how is the current state of each? And, in your opinion, what is the future of data visualization in Julia Language? 2 posts - 2 participants...

View Article


Help with web forms

I’m trying to learn how to do some really simple web stuff, like automatically filling out forms, with Julia and am kind of at loss. I found this python article, which has a simple example using...

View Article

Dispatch on fields of my struct?

I’ve made a newbie mistake in constructing my types, and hoping for some good advice how to fix. I two types, both containers having identical data layouts as below. I made them distinct because they...

View Article

Minimum by key function

How can I find the minimum value of an array, but evaluating the minimum through a key function? In Python, In [6]: min([-3, -1, 2], key=abs) Out[6]: -1 3 posts - 3 participants Read full topic

View Article
Browsing all 2795 articles
Browse latest View live