# Specific Domains

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

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

**Page:** 342

---

## [Obtaining the axis of a \`Colorbar\`](https://discourse.julialang.org/t/obtaining-the-axis-of-a-colorbar/67207)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 7\
**Last updated:** [August 28, 2021, 2:19pm UTC](https://discourse.julialang.org/t/obtaining-the-axis-of-a-colorbar/67207 "2021-08-28T14:19:11Z")

</div>

I am trying to implement a scroll-behaviour on a Colorbar placed in a gridlayout cell (e.g. fig\[1,2\]). However, I cannot find out, how to obtain the corresponding axis, which I need to register\_interaction!(ax) the scro…

---

## [Need help to translate this Pytorch part to Flux](https://discourse.julialang.org/t/need-help-to-translate-this-pytorch-part-to-flux/67032)

<div class="topic-metadata">

**Author:** [@extremety1989](https://discourse.julialang.org/u/extremety1989)\
**Replies:** 6\
**Last updated:** [August 26, 2021, 6:56pm UTC](https://discourse.julialang.org/t/need-help-to-translate-this-pytorch-part-to-flux/67032 "2021-08-26T18:56:30Z")

</div>

i already made some progress Pytorch code class ResidualBlock(nn.Module): def \_\_init\_\_(self, in\_channels, channels=32, residual\_beta=0.2): super().\_\_init\_\_() self.residual\_beta = residual\_beta …

---

## [How to add count legend on Bar graph using Gadfly?](https://discourse.julialang.org/t/how-to-add-count-legend-on-bar-graph-using-gadfly/67197)

<div class="topic-metadata">

**Author:** [@wakimchris](https://discourse.julialang.org/u/wakimchris)\
**Replies:** 3\
**Last updated:** [August 28, 2021, 8:42am UTC](https://discourse.julialang.org/t/how-to-add-count-legend-on-bar-graph-using-gadfly/67197 "2021-08-28T08:42:02Z")

</div>

I have created a DataFrame such as │ Row │ Gender\_Code │ N │ │ │ String │ Int64 │ ├─────┼─────────────┼───────┤ │ 1 │ M │ 1789 │ │ 2 │ F │ 205 │ When I applied on it Geom.bar, th…

---

## [How to keep only first 20 rows in DataFrame?](https://discourse.julialang.org/t/how-to-keep-only-first-20-rows-in-dataframe/67206)

<div class="topic-metadata">

**Author:** [@wakimchris](https://discourse.julialang.org/u/wakimchris)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 6:13am UTC](https://discourse.julialang.org/t/how-to-keep-only-first-20-rows-in-dataframe/67206 "2021-08-28T06:13:56Z")

</div>

How do I keep only first 20 rows in a DataFrame and export it to a new DataFrame variable? in one line

---

## [Truncated Poisson Distribution probs not adding up to one](https://discourse.julialang.org/t/truncated-poisson-distribution-probs-not-adding-up-to-one/61053)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 4:50am UTC](https://discourse.julialang.org/t/truncated-poisson-distribution-probs-not-adding-up-to-one/61053 "2021-08-28T04:50:39Z")

</div>

using Distributions λ = 2.0; #Poisson parameter zp = 0.4; #zero prob. dpoi = Poisson(λ) dzip = MixtureModel(\[Dirac(0.0), dpoi\], \[zp, 1.0-zp\]) #ZeroInflated ZIP dztp = Truncated(dpoi, 1, Inf) #Ze…

---

## [It's running too long](https://discourse.julialang.org/t/its-running-too-long/66921)

<div class="topic-metadata">

**Author:** [@zhangsanle](https://discourse.julialang.org/u/zhangsanle)\
**Replies:** 6\
**Last updated:** [August 28, 2021, 2:07am UTC](https://discourse.julialang.org/t/its-running-too-long/66921 "2021-08-28T02:07:08Z")

</div>

I ran the following code for 7 hours without any results, how can I modify it? Thanks using Optim, LinearAlgebra, Statistics, Plots, QuantEcon, Distributions, Interpolations, NLsolve, Random, JuMP, GLPK import Ipopt β…

---

## [Error This intrinsic must be compiled to be called. Flux/Zygote](https://discourse.julialang.org/t/error-this-intrinsic-must-be-compiled-to-be-called-flux-zygote/66966)

<div class="topic-metadata">

**Author:** [@bgladman](https://discourse.julialang.org/u/bgladman)\
**Replies:** 5\
**Last updated:** [August 28, 2021, 1:10am UTC](https://discourse.julialang.org/t/error-this-intrinsic-must-be-compiled-to-be-called-flux-zygote/66966 "2021-08-28T01:10:33Z")

</div>

Hey all. I am trying to implement a neural network controller which emulates this example https://github.com/FluxML/Trebuchet.jl. In place of the ODE solver I am using a previously trained Flux model which outputs a si…

---

## [AoG with\_theme](https://discourse.julialang.org/t/aog-with-theme/67149)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [August 28, 2021, 12:24am UTC](https://discourse.julialang.org/t/aog-with-theme/67149 "2021-08-28T00:24:35Z")

</div>

using AlgebraOfGraphics, CategoricalArrays, CairoMakie let n = 100 k = 13 d = data((x=rand(n), y=rand(n), c=rand(CategoricalArray(1:k, ordered=true), n))) v = visual(Scatter) m = mapping(:x, :y, color=:c) spec = d \* v \*…

---

## [How lazy is too lazy? An exercise in pseudoinverses](https://discourse.julialang.org/t/how-lazy-is-too-lazy-an-exercise-in-pseudoinverses/67020)

<div class="topic-metadata">

**Author:** [@artkuo](https://discourse.julialang.org/u/artkuo)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 11:16pm UTC](https://discourse.julialang.org/t/how-lazy-is-too-lazy-an-exercise-in-pseudoinverses/67020 "2021-08-27T23:16:07Z")

</div>

Inspired by this discussion, I worked up a self-education project to let a naive user type inv(A'A)A'b expecting to do a pseudoinverse by hand. But the package lazily avoids doing any inversion or matrix multiplication, …

---

## [\[CUDA\] Issue with cached\_memory() and Quadro RTX](https://discourse.julialang.org/t/cuda-issue-with-cached-memory-and-quadro-rtx/67102)

<div class="topic-metadata">

**Author:** [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)\
**Replies:** 3\
**Last updated:** [August 27, 2021, 8:17pm UTC](https://discourse.julialang.org/t/cuda-issue-with-cached-memory-and-quadro-rtx/67102 "2021-08-27T20:17:48Z")

</div>

I have a new toy to play with (a Quadro RTX) and I want to use CUDA.jl with the GPU. I get a quite simple yet annoying issue associated to the function cached\_memory. The very simple MWE julia\> CUDA.versioninfo() CU…

---

## [Minimum size of Makie grid cell?](https://discourse.julialang.org/t/minimum-size-of-makie-grid-cell/67082)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 4:50pm UTC](https://discourse.julialang.org/t/minimum-size-of-makie-grid-cell/67082 "2021-08-27T16:50:20Z")

</div>

I am layouting a Makie.jl figure with some figure elements (at \[1,1\], \[2,1\] and \[1,2\]) and a text box (at \[2,2\]). The text box is created as well as an axis and the text is written (a little painfully) into it. To get a …

---

## [Tracking DMRG progress in ITensors](https://discourse.julialang.org/t/tracking-dmrg-progress-in-itensors/66907)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 1\
**Last updated:** [August 27, 2021, 4:26pm UTC](https://discourse.julialang.org/t/tracking-dmrg-progress-in-itensors/66907 "2021-08-27T16:26:10Z")

</div>

I’m using ITensors to do some DMRG calculation. When running dmrg(H, ψ\_0, sweeps), is there a way to track the progress? For example, if I want to displa a progress bar to keep an eye on the calculation, what should I do…

---

## [Smooth Signal Correlation](https://discourse.julialang.org/t/smooth-signal-correlation/67055)

<div class="topic-metadata">

**Author:** [@user1200](https://discourse.julialang.org/u/user1200)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 3:30pm UTC](https://discourse.julialang.org/t/smooth-signal-correlation/67055 "2021-08-27T15:30:34Z")

</div>

Hello I wanted, to smooth data signal. For example, using mean y\[1\]=(a\[1\]+a\[2\])/2 it is y\[1\]=0.5\*a\[1\]+0.5\*a\[2\] y\[2\]=0.5\*a\[3\]+0.5\*a\[4\] But in specific way, that new signal (y), need to have some attributes: for e…

---

## [AlgebraOfGraphics force points colors in scatter plot](https://discourse.julialang.org/t/algebraofgraphics-force-points-colors-in-scatter-plot/67089)

<div class="topic-metadata">

**Author:** [@rvezy](https://discourse.julialang.org/u/rvezy)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 1:16pm UTC](https://discourse.julialang.org/t/algebraofgraphics-force-points-colors-in-scatter-plot/67089 "2021-08-27T13:16:44Z")

</div>

I starting using AlgebraOfGraphics and I really like it so far. Now I’m using it in a Pluto notebook to plot two variables as a scatter colored by groups with CairoMakie as a backend. I also added some checkboxes to mak…

---

## [Ordered color palette](https://discourse.julialang.org/t/ordered-color-palette/67005)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [August 27, 2021, 9:50am UTC](https://discourse.julialang.org/t/ordered-color-palette/67005 "2021-08-27T09:50:56Z")

</div>

I want to use a palette that is ordered rather than nominal or continuous. If I don’t specify a palette, I get nominal. If I specify a continuous one, I get an error. visual(Scatter, colormap=:viridis) doesn’t change any…

---

## [A living post of Julia vs R's data manipulation tasks speeds](https://discourse.julialang.org/t/a-living-post-of-julia-vs-rs-data-manipulation-tasks-speeds/6316)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 21\
**Last updated:** [August 27, 2021, 6:36am UTC](https://discourse.julialang.org/t/a-living-post-of-julia-vs-rs-data-manipulation-tasks-speeds/6316 "2021-08-27T06:36:49Z")

</div>

Update Please also see a new post https://www.codementor.io/zhuojiadai/an-empirical-study-of-group-by-strategies-in-julia-dagnosell Original post https://www.codementor.io/zhuojiadai/speed-of-data-manipulation-in-juli…

---

## [\`rowsize!\` and \`colsize!\` for nested layouts](https://discourse.julialang.org/t/rowsize-and-colsize-for-nested-layouts/66981)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 6:33am UTC](https://discourse.julialang.org/t/rowsize-and-colsize-for-nested-layouts/66981 "2021-08-27T06:33:39Z")

</div>

I am writing code which generates a specific layout with interactions etc. It works fine for a figure, but as soon as I try to embed it as a subfigure I am getting into trouble. The reason is that rowsize! and colsize! f…

---

## [Bipartite networks](https://discourse.julialang.org/t/bipartite-networks/67065)

<div class="topic-metadata">

**Author:** [@emchateau](https://discourse.julialang.org/u/emchateau)\
**Replies:** 2\
**Last updated:** [August 26, 2021, 10:48pm UTC](https://discourse.julialang.org/t/bipartite-networks/67065 "2021-08-26T22:48:24Z")

</div>

Quite new to Julia but we enjoy it a lot. We are currently trying to use it for network analysis working with LightGraph. We were wondering if some of you could point us to exemple for bi-partite networks analysis done …

---

## [SequenceVariation: Brainstorming for new package](https://discourse.julialang.org/t/sequencevariation-brainstorming-for-new-package/66918)

<div class="topic-metadata">

**Author:** [@jakobnissen](https://discourse.julialang.org/u/jakobnissen)\
**Replies:** 3\
**Last updated:** [August 26, 2021, 6:04pm UTC](https://discourse.julialang.org/t/sequencevariation-brainstorming-for-new-package/66918 "2021-08-26T18:04:29Z")

</div>

I’d like to make a new package for BioJulia. I’ve made a crude prototype, but I’m still unsure about the design and API and would like some feedback, and maybe pushback if my current design has problems. I think I asked …

---

## [NeuralODE not taking multiple inputs although neural network is able to do so](https://discourse.julialang.org/t/neuralode-not-taking-multiple-inputs-although-neural-network-is-able-to-do-so/67042)

<div class="topic-metadata">

**Author:** [@DiracFermion1](https://discourse.julialang.org/u/DiracFermion1)\
**Replies:** 0\
**Last updated:** [August 26, 2021, 2:58pm UTC](https://discourse.julialang.org/t/neuralode-not-taking-multiple-inputs-although-neural-network-is-able-to-do-so/67042 "2021-08-26T14:58:15Z")

</div>

(this question is related to How to use multiple inputs in \`NeuralODE\` object? with a concrete example) Hi, I am trying to define a NeuralODE that takes two inputs (one input is a Float array, another is an Int array). …

---

## [Specifying datatype in JuMP expressions and constraints to save memory](https://discourse.julialang.org/t/specifying-datatype-in-jump-expressions-and-constraints-to-save-memory/66515)

<div class="topic-metadata">

**Author:** [@anon94806364](https://discourse.julialang.org/u/anon94806364)\
**Replies:** 14\
**Last updated:** [August 26, 2021, 1:43pm UTC](https://discourse.julialang.org/t/specifying-datatype-in-jump-expressions-and-constraints-to-save-memory/66515 "2021-08-26T13:43:07Z")

</div>

I am solving for an ILP that, despite my best efforts to downsize (ie. use sparse matrices), is taking ~ 100 GB RAM. In my model, I have expressions that are the sum of binary variables \* integer variables. Perhaps mist…

---

## [Error when calling 'using Cbc'](https://discourse.julialang.org/t/error-when-calling-using-cbc/67014)

<div class="topic-metadata">

**Author:** [@Kreiton\_Sitorus](https://discourse.julialang.org/u/Kreiton_Sitorus)\
**Replies:** 10\
**Last updated:** [August 26, 2021, 12:43pm UTC](https://discourse.julialang.org/t/error-when-calling-using-cbc/67014 "2021-08-26T12:43:28Z")

</div>

Hello, I think I need help. I’m trying to use Cbc. I’ve called the Pkg.add(“Cbc”) and it installs it as usual. But, when I called using Cbc this error message pops out: julia\> using Cbc \[ Info: Precompiling Cbc \[9961bab…

---

## [\[MTK\] Interpolating observed variables](https://discourse.julialang.org/t/mtk-interpolating-observed-variables/66308)

<div class="topic-metadata">

**Author:** [@doppioandante](https://discourse.julialang.org/u/doppioandante)\
**Replies:** 9\
**Last updated:** [August 26, 2021, 11:55am UTC](https://discourse.julialang.org/t/mtk-interpolating-observed-variables/66308 "2021-08-26T11:55:38Z")

</div>

I am toying around with ModelingToolkit, I have a very simple algebraic model representing the voltage/current relationship in a ideal resistor: using ModelingToolkit, OrdinaryDiffEq @parameters R @variables t v(t) i(t…

---

## [How to use functions in jump's target functions](https://discourse.julialang.org/t/how-to-use-functions-in-jumps-target-functions/67019)

<div class="topic-metadata">

**Author:** [@zhangsanle](https://discourse.julialang.org/u/zhangsanle)\
**Replies:** 1\
**Last updated:** [August 26, 2021, 8:17am UTC](https://discourse.julialang.org/t/how-to-use-functions-in-jumps-target-functions/67019 "2021-08-26T08:17:05Z")

</div>

I want to know why there was an error running the following program. I need to change the parameters wx and wy of tt several times, so I want to use them directly in the target function Incorrect number of arguments for…

---

## [Help fitting linear probability model with GLM.jl](https://discourse.julialang.org/t/help-fitting-linear-probability-model-with-glm-jl/67004)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 4\
**Last updated:** [August 26, 2021, 7:25am UTC](https://discourse.julialang.org/t/help-fitting-linear-probability-model-with-glm-jl/67004 "2021-08-26T07:25:57Z")

</div>

I’m looking to fit a linear probability model of the form: y\_i = \\alpha X\_i + PT\_i \\beta + \\phi\_j + \\lambda\_r + \\epsilon\_i Where: y\_i is 1 if worker is independent contractor on main job, else 0 X\_i is a vector of pe…

---

## [Approximating sine function using Flux for Solving PINN problem](https://discourse.julialang.org/t/approximating-sine-function-using-flux-for-solving-pinn-problem/66323)

<div class="topic-metadata">

**Author:** [@Chaitanya](https://discourse.julialang.org/u/Chaitanya)\
**Replies:** 5\
**Last updated:** [August 26, 2021, 6:01am UTC](https://discourse.julialang.org/t/approximating-sine-function-using-flux-for-solving-pinn-problem/66323 "2021-08-26T06:01:06Z")

</div>

In this code I am trying to predict u(x,t)= NN(\\theta) so that after I predict this I can use the neural network to solve PINN problems. However, I’m not able to train the model and reduce the loss function. import Flux…

---

## [Product of two stochastic processes in DifferentialEquations.jl](https://discourse.julialang.org/t/product-of-two-stochastic-processes-in-differentialequations-jl/66391)

<div class="topic-metadata">

**Author:** [@mastrof](https://discourse.julialang.org/u/mastrof)\
**Replies:** 3\
**Last updated:** [August 26, 2021, 4:27am UTC](https://discourse.julialang.org/t/product-of-two-stochastic-processes-in-differentialequations-jl/66391 "2021-08-26T04:27:32Z")

</div>

Hello, I have recently started to play out with DifferentialEquations.jl; I’m gradually reading through the docs but there’s a lot of stuff in there which will keep me busy for a while, so I’m still at a beginner level. …

---

## [MakieLayout - deleting Sliders (or GridPositions)](https://discourse.julialang.org/t/makielayout-deleting-sliders-or-gridpositions/66879)

<div class="topic-metadata">

**Author:** [@JCQ](https://discourse.julialang.org/u/JCQ)\
**Replies:** 2\
**Last updated:** [August 25, 2021, 11:13pm UTC](https://discourse.julialang.org/t/makielayout-deleting-sliders-or-gridpositions/66879 "2021-08-25T23:13:47Z")

</div>

Here is a code snippet for the problem that I am having: using GLMakie,Colors,GeometryBasics fig = Figure(resolution = (1920, 1080)) plot\_scene = LScene(fig\[1,1\], scenekw=(camera = old\_cam3d!,show\_axis = false),tellwi…

---

## [No variability in xgboost outputs? (XGBoost.jl)](https://discourse.julialang.org/t/no-variability-in-xgboost-outputs-xgboost-jl/66211)

<div class="topic-metadata">

**Author:** [@matnbo](https://discourse.julialang.org/u/matnbo)\
**Replies:** 10\
**Last updated:** [August 25, 2021, 5:32pm UTC](https://discourse.julialang.org/t/no-variability-in-xgboost-outputs-xgboost-jl/66211 "2021-08-25T17:32:14Z")

</div>

Dear all I am using functions “xgboost” from the R packages “xgboost” and the Julia package “XGBoost.jl” that both interface the XGBoost library. May be I missed something but I observed surprising outputs from XGBo…

---

## [Best way to define and re-use multiple JuMP nonlinear models](https://discourse.julialang.org/t/best-way-to-define-and-re-use-multiple-jump-nonlinear-models/66840)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 3\
**Last updated:** [August 25, 2021, 8:18pm UTC](https://discourse.julialang.org/t/best-way-to-define-and-re-use-multiple-jump-nonlinear-models/66840 "2021-08-25T20:18:51Z")

</div>

I have a for loop where at each iteration I am solving multiple version of a similar nonlinear problem with some parameter update. I tried 3 ways to define the base(s) model I call at each iteration + update the paramet…

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

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