Tensor product inside function
@Veenty wrote: So I have the following code function CC_trap(X::Array{Float64,2}, tag::Int64) a = 0.0 for i=1:size(X)[1] for j=1:size(X)[2] global a += weights_CC[i]*X[i,j] end end a =...
View ArticlePlotting two lines on one plot over the same x range but with different x...
@CPPhysics wrote: I would like to plot two line plots on the same plot, however I have two sets of data and while for both sets the x domain range is the same (0,.25) the values which are paired with...
View ArticleOld procedure guy
@wcostrino wrote: Hello, community. I am trying to convert myself from old procedures and shells programming to Julia. I am strugling to learn objects and the Julia paradigm but a lot of old habits...
View ArticleHow to graphically solve a problem?
@RaquelSantos wrote: Is it possible to get the graphical solution of the x1 and x2 result of this problem using the Pyplot package? using JuMP, Cbc using PyPlot Test1 = Model(solver = CbcSolver())...
View Article"Right" way to broadcast vector-valued functions?
@jlchan wrote: I’m trying to figure out the “right” way to combine broadcasting with functions for vector-valued inputs/outputs. For example, the following function defines foo through broadcasted...
View ArticleCorrect way to do multiple variable assignments
@duncanam wrote: I am trying to find out the right way to do something like this: a,b,c = 1,2,3 or perhaps a,b,c = (1,2,3) I am seeing that this thread says that the left hand side is actually being...
View ArticleHow to filter out rows with NaN in specific fields?
@abe wrote: This seems like a pretty basic operation, but I’m having difficulty figuring it out. In dplyr I’d do something like filtering based on !is.na(my_field), but I’m not sure what the...
View ArticleHelp with parallel computing for a simple loop with a large function
@drez wrote: Hi, I am relatively new to and wish to implement parallel computing in my code. Currently, I have a code with a large function f(x) within a loop. For example, for i = 1:N a[ i ] = f(x[ i...
View ArticleIs it correct that it recompiles packages every time a new REPL is opened?
@Nycto wrote: E.g. the first time you use plots.jl after opening a new REPL it has to recompile. I was thinking that since the code is unchanged, shouldn’t it just use the old compiled version? Is it...
View ArticleConstructing multi-dimensional array from existing ones
@liwt31 wrote: Hi, I’m a new user from Python. I’m trying to do something like: a, b = np.random.rand(5,5), np.random.rand(5,5) c = np.array([a, b]) to obtain an array with dimension (2, 5, 5). But...
View ArticleError when adding packages in Julia 1.3 rc04 on Windows
@Iulian.Cioarca wrote: I have been using Julia 1.3 rc04 happily for the past week. Today I hit ]update and got the error below. Now I can’t add any package at all… Resolving package versions... ┌...
View ArticleFrom "UndefVarError", a hopefully funny intro to Scoping
@HaoLi111 wrote: This is a translation version of the post from Julia中文社区 – 16 May 19 试写一个Julia Scoping作用域的中文讲解 丢了的玩具-从UndefVarError说起 相信很多人遇到过著名的UndefVarError:变量未定义 9成情况下,肇事者写了这样一个程序,引起了Julia不满...
View ArticleSpeeding up the vector-valued version of a fast scalar function
@jlchan wrote: (topic withdrawn by author, will be automatically deleted in 24 hours unless flagged) Posts: 1 Participants: 1 Read full topic
View ArticleErrors when re-including modules in REPL
@jbu wrote: Here’s a minimum working example of the problem I’ve been having. I’m using the Julia v1.1 REPL in Ubuntu Linux 16.04. Suppose I have the following file called moduletest.jl: module...
View ArticleDoes anyone program like this?
@StevenSiew wrote: In chemistry we have the ideal gas Law PV=NRT So do anyone program like this? function CalcVIR(v::Union{Number,Missing}, i::Union{Number,Missing}, r::Union{Number,Missing}) ''' If...
View ArticleRedefining methods in Base
@Sijun wrote: Just curious. It looks like that something as Base.:+(a,b)= a*b has no effect. Does Julia not allow redefining methods in Base? If so, what would be rationale behind it? Posts: 8...
View ArticleJuno ide repl conpty error while starting Julia session
@rocflight83 wrote: Randomly getting this error. Reinstalled to latest version of atom, but guess its unrelated since error persists. Any suggestions?...
View ArticleDict equality with composite type value
@johannmartinet wrote: Still new to Julia and trying to test one of my methods which return a Dict. I know what should be included in this Dict and I try to compare it with what is returned by my...
View ArticleParameter Stores to Struct or not to Struct, what is the julian way?
@ckneale wrote: I am making a simulation package in Julia. There are maybe 10-20 different parameters that must be user defined(not derivable from other means) passed around different functions(mostly...
View ArticleHow to use ForwardDiff.GradientConfig for multiple input functions while...
@bashonubuntu wrote: Hello, I am parallelizing my gradient calculation in a mini-batch stochastic gradient optimization routine. I am wondering what is the best way to configure cfg =...
View Article