# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=427

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 428

---

## [Turing Model debug info](https://discourse.julialang.org/t/turing-model-debug-info/40440)

<div class="topic-metadata">

**Author:** [@rsteckel](https://discourse.julialang.org/u/rsteckel)\
**Replies:** 6\
**Last updated:** [August 17, 2020, 2:55pm UTC](https://discourse.julialang.org/t/turing-model-debug-info/40440 "2020-08-17T14:55:26Z")

</div>

Is there a way to get more information about when Turing is unable to sample from a model? For example, I tried a simple (univariate) mixture of gaussians model and when I try to sample from it, I get this error: ERROR…

---

## [Arrays, MPI, and broadcasting](https://discourse.julialang.org/t/arrays-mpi-and-broadcasting/45098)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 5\
**Last updated:** [August 17, 2020, 2:03pm UTC](https://discourse.julialang.org/t/arrays-mpi-and-broadcasting/45098 "2020-08-17T14:03:46Z")

</div>

I would like to use some kind of AbstractArray based on MPI such that broadcasting can be used for things like +, \*, muladd, which are necessary for simple explicit Runge-Kutta methods (e.g. from OrdinaryDiffEq.jl) cus…

---

## [DiffEq result for a dynamical system differs from wolframalpha](https://discourse.julialang.org/t/diffeq-result-for-a-dynamical-system-differs-from-wolframalpha/45101)

<div class="topic-metadata">

**Author:** [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)\
**Replies:** 3\
**Last updated:** [August 17, 2020, 1:38pm UTC](https://discourse.julialang.org/t/diffeq-result-for-a-dynamical-system-differs-from-wolframalpha/45101 "2020-08-17T13:38:52Z")

</div>

I want to solve this differential equation: (d^2 y(t))/(dt^2) = -0.1×(dy(t))/(dt) + 0.5 y(t) - 2 y(t)^3 + 2 cos(2.4 t) How I tried to solve it using DiffEq: using DifferentialEquations using Plots function duffing!(d…

---

## [Error in constraint statement](https://discourse.julialang.org/t/error-in-constraint-statement/45088)

<div class="topic-metadata">

**Author:** [@mamo](https://discourse.julialang.org/u/mamo)\
**Replies:** 2\
**Last updated:** [August 17, 2020, 10:20am UTC](https://discourse.julialang.org/t/error-in-constraint-statement/45088 "2020-08-17T10:20:24Z")

</div>

I can not identify the reason for “LoadError: syntax: missing comma or ) in argument list in expression starting at” in the first line of this constraint: @constraint(problem1, raball\[r in RAW, k in 1:interval:length(T…

---

## [\[Question\] Python  \`scipy.stats\`  alternative for Julia](https://discourse.julialang.org/t/question-python-scipy-stats-alternative-for-julia/45083)

<div class="topic-metadata">

**Author:** [@rakesh4real](https://discourse.julialang.org/u/rakesh4real)\
**Replies:** 2\
**Last updated:** [August 17, 2020, 8:07am UTC](https://discourse.julialang.org/t/question-python-scipy-stats-alternative-for-julia/45083 "2020-08-17T08:07:03Z")

</div>

Hi, Can I know if there is any Python scipy.stats alternative for Julia. If yes, can anyone please share the link. If not available, is there some similar project where I can get built-in implementations of different …

---

## [Objective function declaration issue](https://discourse.julialang.org/t/objective-function-declaration-issue/45028)

<div class="topic-metadata">

**Author:** [@mamo](https://discourse.julialang.org/u/mamo)\
**Replies:** 4\
**Last updated:** [August 17, 2020, 7:43am UTC](https://discourse.julialang.org/t/objective-function-declaration-issue/45028 "2020-08-17T07:43:46Z")

</div>

If I have a member of an objective function: sum((setup\_cost\[f,p,j\]\*PR\[f,p,j,t\]+oper\_cost\[p,j\]\*PRD\[o,f,p,j,t\]) for o in O,f in FAM, p in PROD\[f\], j in U, t in TIME) and I want to limit the counter o, f and p on 1…end-…

---

## [Accessing constraints from JuMP model created in function](https://discourse.julialang.org/t/accessing-constraints-from-jump-model-created-in-function/45044)

<div class="topic-metadata">

**Author:** [@fnbillimoria](https://discourse.julialang.org/u/fnbillimoria)\
**Replies:** 4\
**Last updated:** [August 17, 2020, 6:07am UTC](https://discourse.julialang.org/t/accessing-constraints-from-jump-model-created-in-function/45044 "2020-08-17T06:07:16Z")

</div>

Hello, I have specified a function which creates a JuMP model as below. I can call the function to create the model, and subsequently can optimize! it. I wish to access the shadow prices/duals of the constraint create…

---

## [Spark.jl: Can we abandon RDD API?](https://discourse.julialang.org/t/spark-jl-can-we-abandon-rdd-api/45063)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 1\
**Last updated:** [August 17, 2020, 1:01am UTC](https://discourse.julialang.org/t/spark-jl-can-we-abandon-rdd-api/45063 "2020-08-17T01:01:19Z")

</div>

Cross-posting from GitHub issue. Originally, Spark.jl was developed for Spark 1.x with its RDD interface, e.g. most useful functions were map , filter , etc. In Spark 2.0, the default interface changed to Dataset ( D…

---

## [Arbitrary table join conditions](https://discourse.julialang.org/t/arbitrary-table-join-conditions/44825)

<div class="topic-metadata">

**Author:** [@derekmahar](https://discourse.julialang.org/u/derekmahar)\
**Replies:** 9\
**Last updated:** [August 16, 2020, 12:47am UTC](https://discourse.julialang.org/t/arbitrary-table-join-conditions/44825 "2020-08-16T00:47:22Z")

</div>

What Julia tabular data types and functions might I use in order to join two tables using a join condition that is more complex than simple equality between sets of columns in each table (an equi-join)? As far as I can …

---

## [Correct constraint statement](https://discourse.julialang.org/t/correct-constraint-statement/45036)

<div class="topic-metadata">

**Author:** [@mamo](https://discourse.julialang.org/u/mamo)\
**Replies:** 2\
**Last updated:** [August 16, 2020, 11:22am UTC](https://discourse.julialang.org/t/correct-constraint-statement/45036 "2020-08-16T11:22:59Z")

</div>

In this constraint k goes from 1 to end but with step equal to in “interval” (scalar equal to 20 for example): ‘’‘rawmbal1\[r in RAW, k in 1…end by interval: k==1\], INV\[r,k\]=invraw\[r,k\]-sum(PRD\[o,f,p,j,t\]\*demraw\[p,r\] fo…

---

## [Does DiffEqFlux.jl supports a constrained optimal control problem, where in both control and states are constrained](https://discourse.julialang.org/t/does-diffeqflux-jl-supports-a-constrained-optimal-control-problem-where-in-both-control-and-states-are-constrained/44246)

<div class="topic-metadata">

**Author:** [@manvibharat](https://discourse.julialang.org/u/manvibharat)\
**Replies:** 3\
**Last updated:** [August 16, 2020, 1:38am UTC](https://discourse.julialang.org/t/does-diffeqflux-jl-supports-a-constrained-optimal-control-problem-where-in-both-control-and-states-are-constrained/44246 "2020-08-16T01:38:14Z")

</div>

I am new to Julia and I am still learning the language. I thought I could use Julia to solve an Optimal Control problem, which has some constraints. I looked at two examples I found at Readme · DiffEqFlux.jl and https:…

---

## [Constraints with for loop and if statements](https://discourse.julialang.org/t/constraints-with-for-loop-and-if-statements/45009)

<div class="topic-metadata">

**Author:** [@Micah\_Mungal](https://discourse.julialang.org/u/Micah_Mungal)\
**Replies:** 1\
**Last updated:** [August 15, 2020, 9:00pm UTC](https://discourse.julialang.org/t/constraints-with-for-loop-and-if-statements/45009 "2020-08-15T21:00:27Z")

</div>

Hi, I am new to Julia and by extension JuMP. I am trying to rewrite a model for an optimization problem from Matlab to Julia using JuMP. Now following the documentation on the JuMP webpage, I have some doubts about writi…

---

## [Adding a trendline or line of best fit](https://discourse.julialang.org/t/adding-a-trendline-or-line-of-best-fit/44939)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 7\
**Last updated:** [August 15, 2020, 1:12am UTC](https://discourse.julialang.org/t/adding-a-trendline-or-line-of-best-fit/44939 "2020-08-15T01:12:57Z")

</div>

I’m quite surprised there are no posts about trendlines or lines of best fit on these forums. Maybe they are called something else? The only thing I’ve been able to find online is this: using LinearAlgebra dates = 1:150…

---

## [Inverse and backslash \\ division](https://discourse.julialang.org/t/inverse-and-backslash-division/44680)

<div class="topic-metadata">

**Author:** [@luboshanus](https://discourse.julialang.org/u/luboshanus)\
**Replies:** 5\
**Last updated:** [August 14, 2020, 8:18pm UTC](https://discourse.julialang.org/t/inverse-and-backslash-division/44680 "2020-08-14T20:18:06Z")

</div>

Hi, could anyone please explain to me how to use inv() and \\ properly to have valid results. Alse when checking with GLM package basic OLS gives different results and sometimes it is way too far. It might be caused by t…

---

## [Error when using dynamic parallelism with six or more arguments](https://discourse.julialang.org/t/error-when-using-dynamic-parallelism-with-six-or-more-arguments/44931)

<div class="topic-metadata">

**Author:** [@emiwar](https://discourse.julialang.org/u/emiwar)\
**Replies:** 1\
**Last updated:** [August 14, 2020, 7:50pm UTC](https://discourse.julialang.org/t/error-when-using-dynamic-parallelism-with-six-or-more-arguments/44931 "2020-08-14T19:50:34Z")

</div>

Hi, I’m getting an error (unsupported dynamic function invocation) when I run manyArgs(a, b, c, d, e, f) = nothing caller() = (@CUDA.cuda dynamic=true manyArgs(1,2,3,4,5,6); nothing) @CUDA.cuda caller() while manyArg…

---

## [Add line style to legend](https://discourse.julialang.org/t/add-line-style-to-legend/44667)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 3\
**Last updated:** [August 14, 2020, 1:45pm UTC](https://discourse.julialang.org/t/add-line-style-to-legend/44667 "2020-08-14T13:45:48Z")

</div>

Is there a way to add something (in this case a line style) to a legend without plotting it? I am using Plot.jl MWE aa = 1:10 bb = 10 .\* rand(10) cc = 10 .\* rand(10) dd = 10 .\* rand(10) ee = 10 .\* rand(10) ff = 10 .\* r…

---

## [How to plot specific DataFrame points?](https://discourse.julialang.org/t/how-to-plot-specific-dataframe-points/44922)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 3\
**Last updated:** [August 14, 2020, 12:07pm UTC](https://discourse.julialang.org/t/how-to-plot-specific-dataframe-points/44922 "2020-08-14T12:07:45Z")

</div>

In the end I want to create a scatter plot with a specific value from columns bb:ff against their corresponding value in column gg. In my case, I have a DataFrame which I pull final simulation values out of into a new Da…

---

## [Log scale axis issue with PyPlot (and how to manually fix it)](https://discourse.julialang.org/t/log-scale-axis-issue-with-pyplot-and-how-to-manually-fix-it/44927)

<div class="topic-metadata">

**Author:** [@nicolas](https://discourse.julialang.org/u/nicolas)\
**Replies:** 0\
**Last updated:** [August 14, 2020, 11:14am UTC](https://discourse.julialang.org/t/log-scale-axis-issue-with-pyplot-and-how-to-manually-fix-it/44927 "2020-08-14T11:14:25Z")

</div>

When I execute the following code using PyPlot (Julia 1.5.0 on Windows): using Plots pyplot() scatter(1:5, \[1, 1e-5,1e-10,1e-15,1e-20\], yaxis=:log) The y axis doesn’t show properly. But I have realized by clicking on ‘…

---

## [Plotting a Plane from a function using Makie](https://discourse.julialang.org/t/plotting-a-plane-from-a-function-using-makie/44675)

<div class="topic-metadata">

**Author:** [@fermion4](https://discourse.julialang.org/u/fermion4)\
**Replies:** 4\
**Last updated:** [August 14, 2020, 9:32am UTC](https://discourse.julialang.org/t/plotting-a-plane-from-a-function-using-makie/44675 "2020-08-14T09:32:19Z")

</div>

I just started using Makie to plot. Is it possible to plot a plane directly from a given function? Eg. I have the following function: y1(y2,y3) = -y2 -y3 - 1.0 I would like to give intervals for y2 and y3 and directly…

---

## [Simultaneous Jacobian and Hessian computations](https://discourse.julialang.org/t/simultaneous-jacobian-and-hessian-computations/44884)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 7\
**Last updated:** [August 13, 2020, 10:15pm UTC](https://discourse.julialang.org/t/simultaneous-jacobian-and-hessian-computations/44884 "2020-08-13T22:15:42Z")

</div>

Hello, I would like to compute the Jacobian and the Hessian of a function f: \\mathbb{R}^n \\xrightarrow{} \\mathbb{R}^m with n,m \\sim60. This function involves multiple Fourier transforms and nonlinear transformations tha…

---

## [New package: BinaryTreeRectanglePacking.jl (N-dimensions)](https://discourse.julialang.org/t/new-package-binarytreerectanglepacking-jl-n-dimensions/44847)

<div class="topic-metadata">

**Author:** [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Replies:** 2\
**Last updated:** [August 13, 2020, 3:52pm UTC](https://discourse.julialang.org/t/new-package-binarytreerectanglepacking-jl-n-dimensions/44847 "2020-08-13T15:52:48Z")

</div>

Hi all, I needed to pack lots of rectangles into a larger rectangle for my current project, and found that there wasn’t yet a suitable Julia algorithm, so I wrote one up and I thought I’d share it. I took the algorithm …

---

## [Converting to DataFrame](https://discourse.julialang.org/t/converting-to-dataframe/44828)

<div class="topic-metadata">

**Author:** [@danicaratelli](https://discourse.julialang.org/u/danicaratelli)\
**Replies:** 4\
**Last updated:** [August 13, 2020, 10:55am UTC](https://discourse.julialang.org/t/converting-to-dataframe/44828 "2020-08-13T10:55:17Z")

</div>

I am loading a large .dta file and then converting it to a DataFrame. However, because of its size, the conversion takes a very long time (~20mins). I don’t need all of the columns in the file so I am wondering whether a…

---

## [Turing.jl: DomainError with -960.1841700397322:](https://discourse.julialang.org/t/turing-jl-domainerror-with-960-1841700397322/44829)

<div class="topic-metadata">

**Author:** [@vkv](https://discourse.julialang.org/u/vkv)\
**Replies:** 3\
**Last updated:** [August 13, 2020, 9:46am UTC](https://discourse.julialang.org/t/turing-jl-domainerror-with-960-1841700397322/44829 "2020-08-13T09:46:58Z")

</div>

Running the code results in the following error using Turing, ReverseDiff, Memoization Turing.setadbackend(:reversediff) Turing.setrdcache(true) y1 = rand(10) A1 = rand(10, 10) function logsumexp(mat) max\_ = maxi…

---

## [Problem setup for UODE testing](https://discourse.julialang.org/t/problem-setup-for-uode-testing/44422)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 11\
**Last updated:** [August 13, 2020, 8:38am UTC](https://discourse.julialang.org/t/problem-setup-for-uode-testing/44422 "2020-08-13T08:38:33Z")

</div>

Hi all, I’m following these Universal ODE examples, trying to get one of my own systems to work. Having a good deal of issues getting things to solve & I hope someone can see the error I’m making. Problem is that I see…

---

## [Proper syntax for adding reactions to a reaction network using addreaction!() function in Catalyst.jl](https://discourse.julialang.org/t/proper-syntax-for-adding-reactions-to-a-reaction-network-using-addreaction-function-in-catalyst-jl/44804)

<div class="topic-metadata">

**Author:** [@spock1](https://discourse.julialang.org/u/spock1)\
**Replies:** 3\
**Last updated:** [August 13, 2020, 4:15am UTC](https://discourse.julialang.org/t/proper-syntax-for-adding-reactions-to-a-reaction-network-using-addreaction-function-in-catalyst-jl/44804 "2020-08-13T04:15:42Z")

</div>

I recently started to thinking about switching my simulations to Julia and got to know about Catalyst.jl package and its convenient macro to create and modify reaction networks. I wanted to add a reaction to an already…

---

## [Rand() period](https://discourse.julialang.org/t/rand-period/44837)

<div class="topic-metadata">

**Author:** [@steve1313](https://discourse.julialang.org/u/steve1313)\
**Replies:** 1\
**Last updated:** [August 13, 2020, 12:50am UTC](https://discourse.julialang.org/t/rand-period/44837 "2020-08-13T00:50:15Z")

</div>

What is the period of Julia’s rand() function (default rand(), returning Float64)? How many times can you call rand() before it starts repeating?

---

## [Simultaneous left and right multiplication of a matrix](https://discourse.julialang.org/t/simultaneous-left-and-right-multiplication-of-a-matrix/44823)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 1\
**Last updated:** [August 12, 2020, 11:09pm UTC](https://discourse.julialang.org/t/simultaneous-left-and-right-multiplication-of-a-matrix/44823 "2020-08-12T23:09:41Z")

</div>

Hello, I am computing a positive definite matrix H (in my case it is a Hessian) and I would like to transform it into another basis according to P^THP with P an upper triangular matrix. Is there an optimized routine to…

---

## [Query.@mutate weirdness (bug?)](https://discourse.julialang.org/t/query-mutate-weirdness-bug/44642)

<div class="topic-metadata">

**Author:** [@ilyagr](https://discourse.julialang.org/u/ilyagr)\
**Replies:** 2\
**Last updated:** [August 12, 2020, 9:49pm UTC](https://discourse.julialang.org/t/query-mutate-weirdness-bug/44642 "2020-08-12T21:49:35Z")

</div>

As I was trying to figure out another question, I found something that might be a bug (or perhaps a documentation bug) in Query.jl. According to the docs: The @mutate command has the form source |\> @mutate(args...).…

---

## [Activating virtual environment on workers](https://discourse.julialang.org/t/activating-virtual-environment-on-workers/44806)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 5\
**Last updated:** [August 12, 2020, 3:15pm UTC](https://discourse.julialang.org/t/activating-virtual-environment-on-workers/44806 "2020-08-12T15:15:37Z")

</div>

Say we want to use certain package (that is only available in a project-specific virtual environment) in a distributed manner. (@v1.5) pkg\> activate . Activating environment at \`C:\\Users\\Martin Cornejo\\MyProject\\Projec…

---

## [Type error when using sciml\_train with a stiff ODE solver](https://discourse.julialang.org/t/type-error-when-using-sciml-train-with-a-stiff-ode-solver/44763)

<div class="topic-metadata">

**Author:** [@told](https://discourse.julialang.org/u/told)\
**Replies:** 2\
**Last updated:** [August 12, 2020, 2:44pm UTC](https://discourse.julialang.org/t/type-error-when-using-sciml-train-with-a-stiff-ode-solver/44763 "2020-08-12T14:44:20Z")

</div>

I’m using Julia since today so I might miss something fundamental. I recently discovered the UDE for SciML paper and the super nice SciML library. I try to rebuild something similar to the Lotka-Voltera example from the …

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=426)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=428)
