# Specific Domains

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

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

**Page:** 213

---

## [DataFrame inplace change columns order](https://discourse.julialang.org/t/dataframe-inplace-change-columns-order/94971)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 13\
**Last updated:** [February 24, 2023, 3:44pm UTC](https://discourse.julialang.org/t/dataframe-inplace-change-columns-order/94971 "2023-02-24T15:44:06Z")

</div>

Is it possible to change index of two columns by each other in place? I know than I can use something df\[!, \[:b, :a\]\], but I can have many columns… so is any efficient way to change columns with function like: function…

---

## [Diode model not working as expected with ModelingToolkit](https://discourse.julialang.org/t/diode-model-not-working-as-expected-with-modelingtoolkit/95125)

<div class="topic-metadata">

**Author:** [@RagibHasin](https://discourse.julialang.org/u/RagibHasin)\
**Replies:** 4\
**Last updated:** [February 24, 2023, 1:49pm UTC](https://discourse.julialang.org/t/diode-model-not-working-as-expected-with-modelingtoolkit/95125 "2023-02-24T13:49:49Z")

</div>

I am trying to port Modelica.Electrical.Analog.Semiconductors.Diode. The code I came up with is: using ModelingToolkit using ModelingToolkitStandardLibrary.Blocks using ModelingToolkitStandardLibrary.Electrical using Or…

---

## [Cleanest way to convert DataFrame row into a Vector?](https://discourse.julialang.org/t/cleanest-way-to-convert-dataframe-row-into-a-vector/5531)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 20\
**Last updated:** [February 24, 2023, 12:30pm UTC](https://discourse.julialang.org/t/cleanest-way-to-convert-dataframe-row-into-a-vector/5531 "2023-02-24T12:30:59Z")

</div>

I am currently using an ugly hack for it: for row in eachrow(df) vec = convert(Array, row)' # notice the transpose end The problem is that vec has type Matrix in this case, not Vector. I am sure there is a cleaner wa…

---

## [How to use monthly data to calculate quarterly average](https://discourse.julialang.org/t/how-to-use-monthly-data-to-calculate-quarterly-average/94709)

<div class="topic-metadata">

**Author:** [@WhY](https://discourse.julialang.org/u/WhY)\
**Replies:** 8\
**Last updated:** [February 24, 2023, 11:21am UTC](https://discourse.julialang.org/t/how-to-use-monthly-data-to-calculate-quarterly-average/94709 "2023-02-24T11:21:38Z")

</div>

I am trying to use a monthly data to calculate the quarter average, suppose now I randomly generate 10000 month, and try to use this to get the quarterly average by using the loop: T = 10000 a=rand(Int,T) # monthly data…

---

## [MathematicalSystems.jl with input constraint only](https://discourse.julialang.org/t/mathematicalsystems-jl-with-input-constraint-only/95123)

<div class="topic-metadata">

**Author:** [@bienpierre](https://discourse.julialang.org/u/bienpierre)\
**Replies:** 0\
**Last updated:** [February 24, 2023, 11:12am UTC](https://discourse.julialang.org/t/mathematicalsystems-jl-with-input-constraint-only/95123 "2023-02-24T11:12:58Z")

</div>

Dear all, I would like to know if there is a mathematical system structure with only input constraints, for instance: julia\> using LazySets julia\> using MathematicalSystems julia\> A = \[1 1; 0 0.9\] julia\> B = \[1; 0.5\] j…

---

## [Not showing output on Jupyter notebook when using PyCall.jl + python's bokeh combination](https://discourse.julialang.org/t/not-showing-output-on-jupyter-notebook-when-using-pycall-jl-pythons-bokeh-combination/95121)

<div class="topic-metadata">

**Author:** [@YH\_Ko](https://discourse.julialang.org/u/YH_Ko)\
**Replies:** 0\
**Last updated:** [February 24, 2023, 10:42am UTC](https://discourse.julialang.org/t/not-showing-output-on-jupyter-notebook-when-using-pycall-jl-pythons-bokeh-combination/95121 "2023-02-24T10:42:17Z")

</div>

When using Bokeh.jl, the output interactive plot is shown in out cell of Jupyter notebook with no error. (I tried the following Bokeh.jl example) https://cjdoris.github.io/Bokeh.jl/stable/gallery/Basic/les\_mis/#demo\_le…

---

## [Simplified way to save high-res plots in julia](https://discourse.julialang.org/t/simplified-way-to-save-high-res-plots-in-julia/95061)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 5\
**Last updated:** [February 23, 2023, 8:14pm UTC](https://discourse.julialang.org/t/simplified-way-to-save-high-res-plots-in-julia/95061 "2023-02-23T20:14:30Z")

</div>

I’m using jupyter notebooks and the julia plots look pretty decent in those notebook files. however, when I use savefig command, it saves it in a terrible resolution (almost indiscernible.) One way of circumventing this…

---

## [JuMP.jl to solve NLP with higher exponents?](https://discourse.julialang.org/t/jump-jl-to-solve-nlp-with-higher-exponents/95086)

<div class="topic-metadata">

**Author:** [@Chad](https://discourse.julialang.org/u/Chad)\
**Replies:** 1\
**Last updated:** [February 23, 2023, 5:52pm UTC](https://discourse.julialang.org/t/jump-jl-to-solve-nlp-with-higher-exponents/95086 "2023-02-23T17:52:28Z")

</div>

Wondering what is the best solver for Non Linear programming for the objective function with exponent 4 and 5? I am trying to solve for a big graph of the order 20k vertices and 1M edges. Please advise any documentation…

---

## [Drop values near zero in contour fill plot for Makie](https://discourse.julialang.org/t/drop-values-near-zero-in-contour-fill-plot-for-makie/95050)

<div class="topic-metadata">

**Author:** [@garrek](https://discourse.julialang.org/u/garrek)\
**Replies:** 2\
**Last updated:** [February 23, 2023, 5:16pm UTC](https://discourse.julialang.org/t/drop-values-near-zero-in-contour-fill-plot-for-makie/95050 "2023-02-23T17:16:55Z")

</div>

I’m trying to plot some data using a contour plot in Makie. My data has both negative and positive peaks. Near zero, there is a lot of noise. I want to highlight just the main peaks and valleys and I’d like anything near…

---

## [Error using pmap on autodiff ODE solver inside Turing @model function](https://discourse.julialang.org/t/error-using-pmap-on-autodiff-ode-solver-inside-turing-model-function/94449)

<div class="topic-metadata">

**Author:** [@mjmcnelis](https://discourse.julialang.org/u/mjmcnelis)\
**Replies:** 9\
**Last updated:** [February 23, 2023, 4:53pm UTC](https://discourse.julialang.org/t/error-using-pmap-on-autodiff-ode-solver-inside-turing-model-function/94449 "2023-02-23T16:53:53Z")

</div>

Our group is interested in fitting unknown parameters in our multi-physics model using the variational inference package AdvancedVI. To fit the parameters, we use experimental data from multiple tests and run a dynamical…

---

## [Makie Legend overdrawn by Axis3 Tick Labels](https://discourse.julialang.org/t/makie-legend-overdrawn-by-axis3-tick-labels/95083)

<div class="topic-metadata">

**Author:** [@jpdoane](https://discourse.julialang.org/u/jpdoane)\
**Replies:** 1\
**Last updated:** [February 23, 2023, 3:36pm UTC](https://discourse.julialang.org/t/makie-legend-overdrawn-by-axis3-tick-labels/95083 "2023-02-23T15:36:44Z")

</div>

Axis3 tick labels overdraw the legend as shown here. using CairoMakie fig = Figure() ax = fig\[1, 1\] = Axis3(fig) for nn=1:5 scatter!(randn(10),randn(10),randn(10), label="$nn") end axislegend(ax, position=:rb) fig …

---

## [Bitwise operator "&" won't work in kernel functions](https://discourse.julialang.org/t/bitwise-operator-wont-work-in-kernel-functions/93159)

<div class="topic-metadata">

**Author:** [@zero](https://discourse.julialang.org/u/zero)\
**Replies:** 2\
**Last updated:** [February 23, 2023, 2:26pm UTC](https://discourse.julialang.org/t/bitwise-operator-wont-work-in-kernel-functions/93159 "2023-02-23T14:26:56Z")

</div>

Hi everyone, CUDA does not have an intrinsic function to operate “&”. However, in c/c++ you can still use the intrinsic bitwise \_\_and() to get the same result in your kernel method, or in python for example by cupy you …

---

## [Invariant manifolds for hyperbolic equilibria/fixed points](https://discourse.julialang.org/t/invariant-manifolds-for-hyperbolic-equilibria-fixed-points/95068)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 0\
**Last updated:** [February 23, 2023, 9:42am UTC](https://discourse.julialang.org/t/invariant-manifolds-for-hyperbolic-equilibria-fixed-points/95068 "2023-02-23T09:42:17Z")

</div>

I looked in DynamicalSystems.jl to find a function for calculating the invariant manifolds of a hyperbolic equilibrium point or a fixed point for a discrete system, but there doesn’t seem to be one. Is there a package de…

---

## [Plot the camera field of view in Makie?](https://discourse.julialang.org/t/plot-the-camera-field-of-view-in-makie/95036)

<div class="topic-metadata">

**Author:** [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Replies:** 3\
**Last updated:** [February 23, 2023, 9:21am UTC](https://discourse.julialang.org/t/plot-the-camera-field-of-view-in-makie/95036 "2023-02-23T09:21:12Z")

</div>

There is probably a way to achieve this using camera properties, but how could the field of view of the current camera be displayed onto another scene in Makie ? In terms of rendering, one could expect something like …

---

## [How can I set the default font in Makie?](https://discourse.julialang.org/t/how-can-i-set-the-default-font-in-makie/95003)

<div class="topic-metadata">

**Author:** [@rmsmsgood](https://discourse.julialang.org/u/rmsmsgood)\
**Replies:** 8\
**Last updated:** [February 23, 2023, 1:16am UTC](https://discourse.julialang.org/t/how-can-i-set-the-default-font-in-makie/95003 "2023-02-23T01:16:21Z")

</div>

Main question Hi, I am new to Makie.jl for publication-quality vector graphics. I had tried below tutorial but I don’t get how set\_theme! function works. https://docs.makie.org/stable/documentation/theming/index.html#th…

---

## [Setting tolerances in JuMP - is there an Optimizer-independent way?](https://discourse.julialang.org/t/setting-tolerances-in-jump-is-there-an-optimizer-independent-way/95030)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 4\
**Last updated:** [February 22, 2023, 10:14pm UTC](https://discourse.julialang.org/t/setting-tolerances-in-jump-is-there-an-optimizer-independent-way/95030 "2023-02-22T22:14:27Z")

</div>

Is there a simple Optimizer-independent way to set tolerances in JuMP? I searched the documentation and couldn’t find anything on setting tolerances \[I’m tired of multiplying my objective functions by large numbers …

---

## [JuMP Non-Linear Optimization](https://discourse.julialang.org/t/jump-non-linear-optimization/94020)

<div class="topic-metadata">

**Author:** [@mdogan](https://discourse.julialang.org/u/mdogan)\
**Replies:** 14\
**Last updated:** [February 22, 2023, 8:46pm UTC](https://discourse.julialang.org/t/jump-non-linear-optimization/94020 "2023-02-22T20:46:17Z")

</div>

I am trying to optimize the below equation, but it throws out an error. sqrt(transpose(x) \* \[0.00076204 0.00051972; 0.00051972 0.00546173\] \* x) model = Model(HiGHS.Optimizer) @variable(model, x\[1:2\]) @NLobjective(mode…

---

## [LinearSolve is changing their solutions](https://discourse.julialang.org/t/linearsolve-is-changing-their-solutions/95028)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 3\
**Last updated:** [February 22, 2023, 7:06pm UTC](https://discourse.julialang.org/t/linearsolve-is-changing-their-solutions/95028 "2023-02-22T19:06:52Z")

</div>

I am solving some Linear Systems using LinearSolve.jl and its caching system. I was fine doing fine with this example using LinearSolve n = 4 A = rand(n, n) b = \[rand(n) for i ∈ 1:3\] ## everything is 'true' let lin…

---

## [Agents.jl: Establishing a new space type](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915)

<div class="topic-metadata">

**Author:** [@Atiyah](https://discourse.julialang.org/u/Atiyah)\
**Replies:** 12\
**Last updated:** [February 22, 2023, 6:36pm UTC](https://discourse.julialang.org/t/agents-jl-establishing-a-new-space-type/93915 "2023-02-22T18:36:25Z")

</div>

I am attempting to establish a space type relevant to a sophisticated large-scale case study in SocioEconomics field, The existing code has been translated from Python code and now I am attempting to integrate Agents.jl …

---

## [How to create a multigraph with weights?](https://discourse.julialang.org/t/how-to-create-a-multigraph-with-weights/77020)

<div class="topic-metadata">

**Author:** [@MILAJO](https://discourse.julialang.org/u/MILAJO)\
**Replies:** 5\
**Last updated:** [February 22, 2023, 2:40pm UTC](https://discourse.julialang.org/t/how-to-create-a-multigraph-with-weights/77020 "2023-02-22T14:40:00Z")

</div>

Hi. I have now been searching through multiple source codes within the different Julia graphs packages ( Graphs, MetaGraphs, SimpleWeightedGraphs) and also found the package called Multigraphs. However, I cannot seem to…

---

## [Problem with multi-armed bandit problem: explore vs. exploit dilemmas](https://discourse.julialang.org/t/problem-with-multi-armed-bandit-problem-explore-vs-exploit-dilemmas/95002)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 4\
**Last updated:** [February 22, 2023, 1:56pm UTC](https://discourse.julialang.org/t/problem-with-multi-armed-bandit-problem-explore-vs-exploit-dilemmas/95002 "2023-02-22T13:56:22Z")

</div>

A methodology which is called Thompson sampling per multi-armed bandit problem is illustrated here § 3.8 Example: Bayesian Bandits In the description of this simulated experiment I cannot understand this instruction …

---

## [No model matching using MLJ, how should I prepare my data?](https://discourse.julialang.org/t/no-model-matching-using-mlj-how-should-i-prepare-my-data/94955)

<div class="topic-metadata">

**Author:** [@lsablon](https://discourse.julialang.org/u/lsablon)\
**Replies:** 3\
**Last updated:** [February 22, 2023, 12:33pm UTC](https://discourse.julialang.org/t/no-model-matching-using-mlj-how-should-i-prepare-my-data/94955 "2023-02-22T12:33:12Z")

</div>

Hi, I’m taking one of my first steps into MLJ by writing a simple script that can predict diverse fields for my research. I know what I want to do can be achieved using simpler interpolation methods or Flux.jl, but I wa…

---

## [How get the values of pdf function Beta](https://discourse.julialang.org/t/how-get-the-values-of-pdf-function-beta/94962)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 12\
**Last updated:** [February 22, 2023, 7:53am UTC](https://discourse.julialang.org/t/how-get-the-values-of-pdf-function-beta/94962 "2023-02-22T07:53:51Z")

</div>

using Distributions using StatsPlots plot(Beta(1, 1), ylim=(0, 5), size=(400, 300), label=false, xlabel="x", ylabel="P(x)", title="Beta distribution shapes") How does plot get the values of the Beta pdfunction …

---

## [Does integral function related optimization supported in Julia?](https://discourse.julialang.org/t/does-integral-function-related-optimization-supported-in-julia/94836)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 12\
**Last updated:** [February 22, 2023, 7:22am UTC](https://discourse.julialang.org/t/does-integral-function-related-optimization-supported-in-julia/94836 "2023-02-22T07:22:11Z")

</div>

Hi all, I have a nonlinear optimization problem that involves integral functions, for instance: F(x, a) = $$\\int\_0^x a\*(x - 4y^3)dy + \\int\_0^x\\int\_0^3y (7s^2)dsdy$$ How can I define this objective (involves single a…

---

## [Adjusting scales for size automatically in GLMakie](https://discourse.julialang.org/t/adjusting-scales-for-size-automatically-in-glmakie/94997)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [February 22, 2023, 6:17am UTC](https://discourse.julialang.org/t/adjusting-scales-for-size-automatically-in-glmakie/94997 "2023-02-22T06:17:42Z")

</div>

I have my own custom theme for figures used in publication, and usually I set all the default sizes (e.g. fontsize, linewidth, etc) assuming the figure has a specific figure width since that is usually the fixed by the j…

---

## [Is there any way to solve a containg Binvary variables Nonconvex problem?](https://discourse.julialang.org/t/is-there-any-way-to-solve-a-containg-binvary-variables-nonconvex-problem/94992)

<div class="topic-metadata">

**Author:** [@kevinqiao](https://discourse.julialang.org/u/kevinqiao)\
**Replies:** 6\
**Last updated:** [February 22, 2023, 5:27am UTC](https://discourse.julialang.org/t/is-there-any-way-to-solve-a-containg-binvary-variables-nonconvex-problem/94992 "2023-02-22T05:27:45Z")

</div>

Hi there, I’m solving a Nonconvex problem, and the nonconvex terms are: @constraint(gNet, gasPipeFlow\[pipeline, time\]^2 == ETA\*(gasNodePres\[AheadNode, time\]^2 - gasNodePres\[TailNode, time\]^2)) gasPipeFlow and gasNodeP…

---

## [How to include bitmap images in CairoMakie?](https://discourse.julialang.org/t/how-to-include-bitmap-images-in-cairomakie/94988)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [February 22, 2023, 1:54am UTC](https://discourse.julialang.org/t/how-to-include-bitmap-images-in-cairomakie/94988 "2023-02-22T01:54:52Z")

</div>

I have a big figure panel which consists many smaller 2D/3D figures. As I would like vector graphics for the 2D parts (and if possible the axes labels, titles, etc for the 3D parts) I use CairoMakie. However, I find that…

---

## [How to (if possible) re-write this simple censored Poisson model without Turing.@addlogprob!](https://discourse.julialang.org/t/how-to-if-possible-re-write-this-simple-censored-poisson-model-without-turing-addlogprob/94902)

<div class="topic-metadata">

**Author:** [@AdamR](https://discourse.julialang.org/u/AdamR)\
**Replies:** 13\
**Last updated:** [February 22, 2023, 12:19am UTC](https://discourse.julialang.org/t/how-to-if-possible-re-write-this-simple-censored-poisson-model-without-turing-addlogprob/94902 "2023-02-22T00:19:10Z")

</div>

I want to estimate the Poisson distribution parameter λ (usually λ \< 1). I am given N observations, however they are censored: I can only see if the value was 0 or greater than zero, i.e. Instead of observing the vector…

---

## [Minibatch ADVI?](https://discourse.julialang.org/t/minibatch-advi/94985)

<div class="topic-metadata">

**Author:** [@spragud2](https://discourse.julialang.org/u/spragud2)\
**Replies:** 0\
**Last updated:** [February 21, 2023, 11:40pm UTC](https://discourse.julialang.org/t/minibatch-advi/94985 "2023-02-21T23:40:33Z")

</div>

Hey! I am trying to train a last-layer bayesian approximation for a neural network. The issue I am running in to is that ADVI tries to take the gradient of the entire dataset… obviously not going to work. Can the ADVI …

---

## [How can I set solPrint from GAMS in JuMP?](https://discourse.julialang.org/t/how-can-i-set-solprint-from-gams-in-jump/94892)

<div class="topic-metadata">

**Author:** [@Saba\_ghasemi](https://discourse.julialang.org/u/Saba_ghasemi)\
**Replies:** 10\
**Last updated:** [February 21, 2023, 6:59pm UTC](https://discourse.julialang.org/t/how-can-i-set-solprint-from-gams-in-jump/94892 "2023-02-21T18:59:12Z")

</div>

I wanna set solPrint. set\_optimizer\_attribute(model, GAMS.SolPrint(), “0”) Do anyone know how to fix this?

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

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