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

How to write type-stable dataflow graphs

I’m trying to implement a dataflow graph for basic arithmetic and encountering type instability for all but trivially simple graphs. How to rewrite this in a type-stable way? module Inst # for...

View Article


Can I install Plots without GR

Currently, when I Pkg.add("Plots"), GR is also installed and built. And if GR is not correctly built, which usual due to network issue, using Plots may fail because GR will also be imported. I know I...

View Article


How to 'using a_local_module'

In a project directory, I have a main.jl and a myModule.jl myModule.jl. contains module myModule … end In the main.jl, how do I use myModule ? using myModule and import myModule both are for modules...

View Article

Non-diagonal noise correlation matrix

Hi all! I am newbie to julia and I am playing with it to solve SDE systems, numerically. I had a look at Non-diagonal noise Tutorial (Example No. 4)...

View Article

Struct variables explicit setting

Hi! I know how to do this: struct a a1 a2 a3 end b=a(1,2,3) I was wondering if there’s a way to do this in a more explicit way. Something like: b=a(a1=1,a2=2,a3=3). The reason would be readability (so...

View Article


Performance disadvantages of structs?

Hello, I have a lot of large arrays (matrices of floats, vectors of floats, vectors of StaticArrays of floats, vectors of StaticArrays of ints) in my code and calling functions is becoming cumbersome,...

View Article

Displaying a parquet file in Arrow

Hi. I am trying to add a Parquet file into Arrow. I tried to follow the Arrow.jl docs and implement it like this: begin df = CSV.read("/home/onur/julia-assignment/temp.csv", DataFrame) file = file =...

View Article

Mutable scalar in immutable object: the best alternative?

I found this old thread about the same thing, but that was before 1.0. Actually while writing this post I figured out most of the details… now I will post it anyway. If one has an immutable struct...

View Article


Update Julia Package in Jupyter notebook

Hello I have added ODE package in Julia and i tried to work in jupyter notebook env but still iam getting the error as install ODE How would i resolve it. Pls help me 2 posts - 2 participants Read...

View Article


Finding unique coluns of a matrix

Dear all, I have a matrix A: A = [ 1.0 0.0 0.0 0.0 1.0 1.0 3.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.0 1.0 0.0 0.0 0.0 1.0 11.0 0.0 0.0 0.0 1.0 0.0 6.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 12.0...

View Article

Image may be NSFW.
Clik here to view.

Signing the points were 2 functions are equal

Hello, there! I’m working with some numerical calculations, plotting 2 diferent functions as follows: using Plots h=0 K=1.5 g(y) = y j(y) = tanh(K*y+h)...

View Article

Plot group size after running groupby

I have a DataFrame with a :group column and did a gb = groupby(df, :group) I would like to plot the group sizes vs. group id. For example, for group gb[1] on the x-axis I would like to plot...

View Article

What is the most efficient binary representation of unsigned integers in Julia?

Hello everybody, I would like to know what is the most efficient binary representation in Julia? My use case is to convert an unsigned integer into a binary representation, then to mutate the elements...

View Article


Make function accept an array of strings and return an array of strings

I’m working on a google translate package, and I’ve got the translating part, but I want a function that will do a batch translate. function batchtranslate(inputstrings::Array{String,1},...

View Article

Preprocessing function arguments

I have a working code like the following: function test(a,b) c = a + b d = a - b e = c + 2 * d end but I now want to sometimes make b a constant s.t. const b = 1.5 function test(a) c = a + b d = a - b...

View Article

Browsing all 2795 articles
Browse latest View live