# Specific Domains

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

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

**Page:** 353

---

## [Get individual frames of an \`Animation\` object](https://discourse.julialang.org/t/get-individual-frames-of-an-animation-object/64310)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 2\
**Last updated:** [July 10, 2021, 11:19am UTC](https://discourse.julialang.org/t/get-individual-frames-of-an-animation-object/64310 "2021-07-10T11:19:54Z")

</div>

Here is an example from the Plots documentation: using Plots @userplot CirclePlot @recipe function f(cp::CirclePlot) x, y, i = cp.args n = length(x) inds = circshift(1:n, 1 - i) linewidth --\> range(0, 1…

---

## [What's wrong with my chi-squared goodness of fits tests?](https://discourse.julialang.org/t/whats-wrong-with-my-chi-squared-goodness-of-fits-tests/64334)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [July 10, 2021, 9:47am UTC](https://discourse.julialang.org/t/whats-wrong-with-my-chi-squared-goodness-of-fits-tests/64334 "2021-07-10T09:47:11Z")

</div>

Hi there. I am following a MOOC where I am learning goodness of fits tests, in particular the chi-square test for discrete rv and the Kolmogorov-Smirnov test for continuous rv. I implemented the tests in the following c…

---

## [Creating User-Defined Grouped DataFrames](https://discourse.julialang.org/t/creating-user-defined-grouped-dataframes/64387)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 1\
**Last updated:** [July 9, 2021, 9:13pm UTC](https://discourse.julialang.org/t/creating-user-defined-grouped-dataframes/64387 "2021-07-09T21:13:20Z")

</div>

Hi all, Just wanted to post a little snippet I learned from @kevbonham about how to create user-defined grouped data frames. What I mean by this, is I was working with time series data recently and wanted to generate gr…

---

## [Triangulation for Cloth Simulation](https://discourse.julialang.org/t/triangulation-for-cloth-simulation/64375)

<div class="topic-metadata">

**Author:** [@graham](https://discourse.julialang.org/u/graham)\
**Replies:** 6\
**Last updated:** [July 9, 2021, 8:30pm UTC](https://discourse.julialang.org/t/triangulation-for-cloth-simulation/64375 "2021-07-09T20:30:02Z")

</div>

Hi all, I’m working on porting over my implementation of the seminal cloth simulator designed by Baraff and Witkin. As first steps, I’m trying to generate a flat plane, triangulated with approximately evenly spaced node…

---

## [Scientific notation + sum() function](https://discourse.julialang.org/t/scientific-notation-sum-function/64368)

<div class="topic-metadata">

**Author:** [@Alex\_Tantos](https://discourse.julialang.org/u/Alex_Tantos)\
**Replies:** 3\
**Last updated:** [July 9, 2021, 6:08pm UTC](https://discourse.julialang.org/t/scientific-notation-sum-function/64368 "2021-07-09T18:08:58Z")

</div>

Hi there! As part of getting to know the language I am preparing the code for the softmax function and I just found out that the sum() function does not return the expected result when some of the numbers of a vector are…

---

## [How to retrieve more results from NEOS Server?](https://discourse.julialang.org/t/how-to-retrieve-more-results-from-neos-server/64222)

<div class="topic-metadata">

**Author:** [@fredih](https://discourse.julialang.org/u/fredih)\
**Replies:** 5\
**Last updated:** [July 9, 2021, 4:32pm UTC](https://discourse.julialang.org/t/how-to-retrieve-more-results-from-neos-server/64222 "2021-07-09T16:32:46Z")

</div>

Hello! How can I retrieve the variable values from the NEOS server? Currently I only receive the objective function value in my e-mail. For example, to this code: using JuMP, NamedArrays, Cbc, NEOSServer threath = Mod…

---

## [Kernel optimization and shared memory](https://discourse.julialang.org/t/kernel-optimization-and-shared-memory/64362)

<div class="topic-metadata">

**Author:** [@Fabrice\_Rosay](https://discourse.julialang.org/u/Fabrice_Rosay)\
**Replies:** 1\
**Last updated:** [July 9, 2021, 4:02pm UTC](https://discourse.julialang.org/t/kernel-optimization-and-shared-memory/64362 "2021-07-09T16:02:47Z")

</div>

Hi, I try to optimize the following kernel using CUDA function kernel(A,B) index = (blockIdx().x - 1) \* blockDim().x + threadIdx().x stride = blockDim().x \* gridDim().x for i in index:stride:size(A,…

---

## [Parameters not updating in Flux](https://discourse.julialang.org/t/parameters-not-updating-in-flux/64208)

<div class="topic-metadata">

**Author:** [@a-ill](https://discourse.julialang.org/u/a-ill)\
**Replies:** 20\
**Last updated:** [July 9, 2021, 3:11pm UTC](https://discourse.julialang.org/t/parameters-not-updating-in-flux/64208 "2021-07-09T15:11:12Z")

</div>

I have the following custom layer. struct Activation{F} f::F Activation(f::Function) = new{typeof(f)}(f) end (m::Activation)(x::AbstractArray) = m.f.(x) I test whether it allows a model to be trained using the …

---

## [Need help with highest posterior density interval plot using Makie](https://discourse.julialang.org/t/need-help-with-highest-posterior-density-interval-plot-using-makie/64320)

<div class="topic-metadata">

**Author:** [@stochastic\_guy](https://discourse.julialang.org/u/stochastic_guy)\
**Replies:** 2\
**Last updated:** [July 9, 2021, 1:43pm UTC](https://discourse.julialang.org/t/need-help-with-highest-posterior-density-interval-plot-using-makie/64320 "2021-07-09T13:43:15Z")

</div>

I am trying to create the highest posterior density interval plot, but haven’t been able to create the one where the HDPI region is shaded and follows the density curve. p\_grid = range(0,stop=1,length=1000) prior = fill…

---

## [Flux: Resample model with different initializations](https://discourse.julialang.org/t/flux-resample-model-with-different-initializations/59097)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 9\
**Last updated:** [July 9, 2021, 12:22pm UTC](https://discourse.julialang.org/t/flux-resample-model-with-different-initializations/59097 "2021-07-09T12:22:38Z")

</div>

Hi, I want to do an experiment in Flux where I want to keep the architecture of the model same and want to initialize the parameters with different variance normal distributions. My current set up looks like this funct…

---

## [Julia equivalent of scipy binned\_statistic\_dd](https://discourse.julialang.org/t/julia-equivalent-of-scipy-binned-statistic-dd/64260)

<div class="topic-metadata">

**Author:** [@jpmorr](https://discourse.julialang.org/u/jpmorr)\
**Replies:** 4\
**Last updated:** [July 9, 2021, 11:06am UTC](https://discourse.julialang.org/t/julia-equivalent-of-scipy-binned-statistic-dd/64260 "2021-07-09T11:06:23Z")

</div>

I’m a python user and I’ve just started experimenting with julia to see if it is as quick as I keep reading. I’m usually dealing with 3D data and one of the most frequently used functions in my workflow is SciPy’s (binn…

---

## [User-defined objective function with scalar and vector inputs](https://discourse.julialang.org/t/user-defined-objective-function-with-scalar-and-vector-inputs/64218)

<div class="topic-metadata">

**Author:** [@mengxiaoliu](https://discourse.julialang.org/u/mengxiaoliu)\
**Replies:** 5\
**Last updated:** [July 9, 2021, 5:12am UTC](https://discourse.julialang.org/t/user-defined-objective-function-with-scalar-and-vector-inputs/64218 "2021-07-09T05:12:01Z")

</div>

Hello, I am using Ipopt to write an optimization problem with a user-defined objective function that has 5 scalar inputs and one vector input. I define the objective function as likelihood((ρ,α,fB,fS,fO,δ…), where δ is …

---

## [JuMP Ipopt performance for MLE](https://discourse.julialang.org/t/jump-ipopt-performance-for-mle/64295)

<div class="topic-metadata">

**Author:** [@mengxiaoliu](https://discourse.julialang.org/u/mengxiaoliu)\
**Replies:** 1\
**Last updated:** [July 9, 2021, 5:10am UTC](https://discourse.julialang.org/t/jump-ipopt-performance-for-mle/64295 "2021-07-09T05:10:26Z")

</div>

Hello, With much of your help, I am finally able to write a functioning code file. However, I was not able to find enough resources online for tuning the performance of Ipopt in JuMP. Now I would like to seek your advi…

---

## [Weight regularisation which iterates params(m) in Flux -- Mutating arrays is not supported](https://discourse.julialang.org/t/weight-regularisation-which-iterates-params-m-in-flux-mutating-arrays-is-not-supported/64314)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 7\
**Last updated:** [July 9, 2021, 4:42am UTC](https://discourse.julialang.org/t/weight-regularisation-which-iterates-params-m-in-flux-mutating-arrays-is-not-supported/64314 "2021-07-09T04:42:08Z")

</div>

I’m trying to implement weight regularisation which requires adding a weight-dependent penalty to the loss function. When I proceed naively, I run into “Mutating arrays is not supported” but I don’t understand what array…

---

## [How do I find the shadow price of anonymous constraints?](https://discourse.julialang.org/t/how-do-i-find-the-shadow-price-of-anonymous-constraints/29349)

<div class="topic-metadata">

**Author:** [@Leonardo\_Rivera](https://discourse.julialang.org/u/Leonardo_Rivera)\
**Replies:** 2\
**Last updated:** [July 8, 2021, 7:59pm UTC](https://discourse.julialang.org/t/how-do-i-find-the-shadow-price-of-anonymous-constraints/29349 "2021-07-08T19:59:45Z")

</div>

Hello! I have a model in which I need to create constraints for the non-zero elements of a sparse matrix (a parameter). I create them as anonymous constraints, but I do not know how to find their dual values after the mo…

---

## [Constrained parameters in Turing](https://discourse.julialang.org/t/constrained-parameters-in-turing/64086)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 3\
**Last updated:** [July 8, 2021, 7:40pm UTC](https://discourse.julialang.org/t/constrained-parameters-in-turing/64086 "2021-07-08T19:40:55Z")

</div>

Hi all, Is it possible to set up a model in Turing so that the posterior distribution of some parameters satisfy a set of constraints? For example, suppose I want to do linear regression, but from physical principles I…

---

## [Handling events in DifferentialEquations.jl that take place over a time interval](https://discourse.julialang.org/t/handling-events-in-differentialequations-jl-that-take-place-over-a-time-interval/64262)

<div class="topic-metadata">

**Author:** [@yuvalw](https://discourse.julialang.org/u/yuvalw)\
**Replies:** 1\
**Last updated:** [July 8, 2021, 10:06am UTC](https://discourse.julialang.org/t/handling-events-in-differentialequations-jl-that-take-place-over-a-time-interval/64262 "2021-07-08T10:06:16Z")

</div>

Hello, I am wondering what is the best way to implement events that happen during a time interval that affect an element of the derivative. Currently my code is of the form: intervals = \[1.0 2.0; 5.0 6.0; 9.0 10.0\] # e…

---

## [Makie - Setting \`zlims!\` on an \`Axis3\` sets \`ylims!\` instead](https://discourse.julialang.org/t/makie-setting-zlims-on-an-axis3-sets-ylims-instead/64254)

<div class="topic-metadata">

**Author:** [@cryptic.ax](https://discourse.julialang.org/u/cryptic.ax)\
**Replies:** 1\
**Last updated:** [July 8, 2021, 8:04am UTC](https://discourse.julialang.org/t/makie-setting-zlims-on-an-axis3-sets-ylims-instead/64254 "2021-07-08T08:04:55Z")

</div>

Hi! I’m having some weird issues making 3D plots with Makie.jl. Consider the following mockup: fig = Figure(; resolution = (600, 600)) ax = fig\[1, 1\] = Axis3(fig) xlims!(ax, (0., 10.)) # works perfectly ylims!(ax, (0.,…

---

## [Makie - Long plotting times for 3D plots using CairoMakie](https://discourse.julialang.org/t/makie-long-plotting-times-for-3d-plots-using-cairomakie/64255)

<div class="topic-metadata">

**Author:** [@cryptic.ax](https://discourse.julialang.org/u/cryptic.ax)\
**Replies:** 1\
**Last updated:** [July 8, 2021, 8:03am UTC](https://discourse.julialang.org/t/makie-long-plotting-times-for-3d-plots-using-cairomakie/64255 "2021-07-08T08:03:13Z")

</div>

I’m trying to record a video of a 3D plot using CairoMakie. My plot consists of one surface! in a (205, 205, 40) size region, and approximately 300 spheres scattered around the same region. Each frame take around 17s to …

---

## [Do FFTW.jl and Quadmath.jl work together automatically?](https://discourse.julialang.org/t/do-fftw-jl-and-quadmath-jl-work-together-automatically/64237)

<div class="topic-metadata">

**Author:** [@johnomotani](https://discourse.julialang.org/u/johnomotani)\
**Replies:** 3\
**Last updated:** [July 8, 2021, 6:38am UTC](https://discourse.julialang.org/t/do-fftw-jl-and-quadmath-jl-work-together-automatically/64237 "2021-07-08T06:38:59Z")

</div>

If some Arrays (or whatever) are defined using the Float128 type from Quadmath.jl, will operations from FFTW.jl be done in quad precision? The FFTW library itself supports quad-precision (Precision (FFTW 3.3.10)), but I …

---

## [Successive optimization in JuMP](https://discourse.julialang.org/t/successive-optimization-in-jump/64056)

<div class="topic-metadata">

**Author:** [@Maria95](https://discourse.julialang.org/u/Maria95)\
**Replies:** 6\
**Last updated:** [July 7, 2021, 11:03pm UTC](https://discourse.julialang.org/t/successive-optimization-in-jump/64056 "2021-07-07T23:03:43Z")

</div>

Sorry for the long post but I thought it is better to give more information. The question itself is not too long! I have given the mathematical formulation below and also my Julia code. Possible solution approach If…

---

## [Failed to use DiffEqOperator in fluidized bed simulation](https://discourse.julialang.org/t/failed-to-use-diffeqoperator-in-fluidized-bed-simulation/64143)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 0\
**Last updated:** [July 6, 2021, 10:25am UTC](https://discourse.julialang.org/t/failed-to-use-diffeqoperator-in-fluidized-bed-simulation/64143 "2021-07-06T10:25:37Z")

</div>

Hello all, I tried to use the DiffEqOperator.jl in fluidized bed simulation but failed. I am not sure if I defined the bc or derivative operator wrongly or it’s another problem. the test code are in the two files: fu…

---

## [Problem with Mutating array not supported in constructing a Wasserstein GAN in Flux](https://discourse.julialang.org/t/problem-with-mutating-array-not-supported-in-constructing-a-wasserstein-gan-in-flux/64203)

<div class="topic-metadata">

**Author:** [@gforchini](https://discourse.julialang.org/u/gforchini)\
**Replies:** 4\
**Last updated:** [July 7, 2021, 1:16pm UTC](https://discourse.julialang.org/t/problem-with-mutating-array-not-supported-in-constructing-a-wasserstein-gan-in-flux/64203 "2021-07-07T13:16:49Z")

</div>

I am trying to construct a Wasserstein GAN as in Gulrajani, et al, Improved Training of Wasserstein GANs. Part of the code is below. The discriminator loss function contains a function of the derivatives of the discrimi…

---

## [(yet another) Zygote: mutating arrays is not supported](https://discourse.julialang.org/t/yet-another-zygote-mutating-arrays-is-not-supported/62294)

<div class="topic-metadata">

**Author:** [@Dhruva2](https://discourse.julialang.org/u/Dhruva2)\
**Replies:** 10\
**Last updated:** [July 7, 2021, 1:11pm UTC](https://discourse.julialang.org/t/yet-another-zygote-mutating-arrays-is-not-supported/62294 "2021-07-07T13:11:25Z")

</div>

Hi all, thanks for the great work on Flux and Zygote! Quick summary: I’m training a simple (feedforward, relu) neural network on MNIST. If I use Flux.Losses.mse as a loss function, my code works If I use Flux.Losses.…

---

## [Makie - Testing GLMakie with correct ReferenceTests](https://discourse.julialang.org/t/makie-testing-glmakie-with-correct-referencetests/64206)

<div class="topic-metadata">

**Author:** [@stroebel](https://discourse.julialang.org/u/stroebel)\
**Replies:** 1\
**Last updated:** [July 7, 2021, 11:40am UTC](https://discourse.julialang.org/t/makie-testing-glmakie-with-correct-referencetests/64206 "2021-07-07T11:40:14Z")

</div>

I am trying to get interactive plotting to work on my machine using either GLMakie or CairoMakie. Currently, both display a window with a black screen and then it seemingly crashes with no information. To try and see if…

---

## [Does Meshing.isosurface() work only with the exact value of iso in maching\_cube()](https://discourse.julialang.org/t/does-meshing-isosurface-work-only-with-the-exact-value-of-iso-in-maching-cube/64146)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 10:34am UTC](https://discourse.julialang.org/t/does-meshing-isosurface-work-only-with-the-exact-value-of-iso-in-maching-cube/64146 "2021-07-07T10:34:35Z")

</div>

I tried to use the function isosurface with marching\_cube, from Meshing.jl. I have volumetric data in an array of size(91, 109, 91), with Float64 values in the interval \[-3, 3\], and I wanted to get the mesh for the i…

---

## [Access y/xlim of a plot in Plots](https://discourse.julialang.org/t/access-y-xlim-of-a-plot-in-plots/11236)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 9:47am UTC](https://discourse.julialang.org/t/access-y-xlim-of-a-plot-in-plots/11236 "2021-07-07T09:47:27Z")

</div>

I’m plotting something with aspect\_ratio=1 (GR backend) and the resulting file (via savefig) has a lot of “air” surrounding the plot. I want to make it a bit more tight. using Plots plot(rand(10), aspect\_ratio = 1) save…

---

## [How to calculate sum of a matrix by row and store in pre-allocated diagnoal matrix](https://discourse.julialang.org/t/how-to-calculate-sum-of-a-matrix-by-row-and-store-in-pre-allocated-diagnoal-matrix/64160)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 6\
**Last updated:** [July 7, 2021, 7:50am UTC](https://discourse.julialang.org/t/how-to-calculate-sum-of-a-matrix-by-row-and-store-in-pre-allocated-diagnoal-matrix/64160 "2021-07-07T07:50:27Z")

</div>

basically what I want to do is calculate the sum of a matrix, say u, by column and store it in a pre-allocated diagonal matrix, say du, in a more efficient way than vi = sum(u, dims=2) for i = 1:length(vi) du\[i, i\] …

---

## [Dynamically setting the constraint sense in JuMP](https://discourse.julialang.org/t/dynamically-setting-the-constraint-sense-in-jump/64155)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 7:14am UTC](https://discourse.julialang.org/t/dynamically-setting-the-constraint-sense-in-jump/64155 "2021-07-07T07:14:28Z")

</div>

Hello! I was wondering if it is possible to specify different types (i.e. \<=, == and \>=) constraints within the same JuMP container. For example @constraint(model, con\[i = 1:3\], i \* x \<= i + 1) So that whether \<=, == …

---

## [Flux: How to create a custom multi-layer model with some parameters shared across layers?](https://discourse.julialang.org/t/flux-how-to-create-a-custom-multi-layer-model-with-some-parameters-shared-across-layers/64190)

<div class="topic-metadata">

**Author:** [@IRM](https://discourse.julialang.org/u/IRM)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 4:39am UTC](https://discourse.julialang.org/t/flux-how-to-create-a-custom-multi-layer-model-with-some-parameters-shared-across-layers/64190 "2021-07-07T04:39:40Z")

</div>

Hi all, I’m somewhat new to Julia and Flux, and trying to train a model similar to a standard dense multi-layer neural network, but with sharing of some trainable parameters between layers. To give a concrete example (…

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

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