# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1392

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

**Page:** 1393

---

## [Understanding issorted's lt keyword](https://discourse.julialang.org/t/understanding-issorteds-lt-keyword/60918)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 88\
**Last updated:** [May 14, 2021, 12:23pm UTC](https://discourse.julialang.org/t/understanding-issorteds-lt-keyword/60918 "2021-05-14T12:23:52Z")

</div>

The lt keyword for issorted and sort! is defying my intuition. From reading the source code, I understand why I get the following results, but I am finding it counterintuitive. From the documentation for sort!: the lt…

---

## [Fixing vs Constraining a variable in JuMP](https://discourse.julialang.org/t/fixing-vs-constraining-a-variable-in-jump/27609)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 13\
**Last updated:** [May 14, 2021, 11:10am UTC](https://discourse.julialang.org/t/fixing-vs-constraining-a-variable-in-jump/27609 "2021-05-14T11:10:13Z")

</div>

I was wondering if someone could explain the differences between fixing and constraining a variable in a little more detail than the JuMP documentation does. If you use fix(...; force=true); my understanding is that thi…

---

## [How to do weighted least squares fit with LsqFit.jl](https://discourse.julialang.org/t/how-to-do-weighted-least-squares-fit-with-lsqfit-jl/61136)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 2\
**Last updated:** [May 14, 2021, 10:54am UTC](https://discourse.julialang.org/t/how-to-do-weighted-least-squares-fit-with-lsqfit-jl/61136 "2021-05-14T10:54:15Z")

</div>

I want to preform a weigted least squares fit with LsqFit.jl The documentation ( Tutorial · LsqFit.jl (julianlsolvers.github.io)) does have a section on it, but no example of curve\_fit() actually being called with a wei…

---

## [New DataFrame whose columns are values of a column and grouped by another column](https://discourse.julialang.org/t/new-dataframe-whose-columns-are-values-of-a-column-and-grouped-by-another-column/61137)

<div class="topic-metadata">

**Author:** [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Replies:** 2\
**Last updated:** [May 14, 2021, 10:37am UTC](https://discourse.julialang.org/t/new-dataframe-whose-columns-are-values-of-a-column-and-grouped-by-another-column/61137 "2021-05-14T10:37:30Z")

</div>

How can I convert df1 to df2: julia\> df1 = DataFrame(:name =\> \["a", "b", "c", "c", "a", "b"\], :count =\> \[1,4,3,6,3,7\], :time =\> \[1,1,1,2,2,2\]) 6×3 DataFrame Row │ name count time │ String Int64 Int64 …

---

## [Capture returned string from show](https://discourse.julialang.org/t/capture-returned-string-from-show/61132)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 1\
**Last updated:** [May 14, 2021, 8:59am UTC](https://discourse.julialang.org/t/capture-returned-string-from-show/61132 "2021-05-14T08:59:36Z")

</div>

Hi, I want to capture the returned string from a dispatched show function on my customized type, but somehow it always returns an empty string: struct MyType end a = MyType() Base.show(io::IO, ::MyType) = println("he…

---

## [Squeeze disappeared (removing dimensions which are equal to 1)?](https://discourse.julialang.org/t/squeeze-disappeared-removing-dimensions-which-are-equal-to-1/51589)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 3\
**Last updated:** [May 14, 2021, 8:00am UTC](https://discourse.julialang.org/t/squeeze-disappeared-removing-dimensions-which-are-equal-to-1/51589 "2021-05-14T08:00:48Z")

</div>

I found old questions about using squeeze but the function seems to have disappeared. Did it move into another library ? I need it because I’m attempting to translate some matlab code :frowning:

---

## [Array equal](https://discourse.julialang.org/t/array-equal/61121)

<div class="topic-metadata">

**Author:** [@Cristian\_Suciava](https://discourse.julialang.org/u/Cristian_Suciava)\
**Replies:** 7\
**Last updated:** [May 14, 2021, 7:07am UTC](https://discourse.julialang.org/t/array-equal/61121 "2021-05-14T07:07:01Z")

</div>

I have a function where I evaluate two arrays. For some reason, I got wrong not equal. Even when I evaluate element by element. What is wrong? Here is my code: Number = 3 n = 15 U = \[1,3,5,7\] ab = V…

---

## [Can reinterpret be told what endian the data is?](https://discourse.julialang.org/t/can-reinterpret-be-told-what-endian-the-data-is/61120)

<div class="topic-metadata">

**Author:** [@ligert123](https://discourse.julialang.org/u/ligert123)\
**Replies:** 1\
**Last updated:** [May 14, 2021, 5:07am UTC](https://discourse.julialang.org/t/can-reinterpret-be-told-what-endian-the-data-is/61120 "2021-05-14T05:07:12Z")

</div>

Hello, i was curious if there is anyway to use reinterpret on a UInt8 vector but flip the endianness of the interpretation? If it cant be done using the reinterpret function directly would anyone know how to flip the va…

---

## [Error while trying to download the Distributions Package on JuliaPro](https://discourse.julialang.org/t/error-while-trying-to-download-the-distributions-package-on-juliapro/60812)

<div class="topic-metadata">

**Author:** [@Diana\_Paola](https://discourse.julialang.org/u/Diana_Paola)\
**Replies:** 9\
**Last updated:** [May 14, 2021, 3:55am UTC](https://discourse.julialang.org/t/error-while-trying-to-download-the-distributions-package-on-juliapro/60812 "2021-05-14T03:55:24Z")

</div>

Hi, I’m pretty new in Julia and I’m trying to download the Distributions Package on JuliaPro 1.5.0-1 and it seems to be an error but I don’t know why :confused: . If anyone can help me because I really need it and I don’…

---

## [Confusion about parameter interpretation in Turing documentation](https://discourse.julialang.org/t/confusion-about-parameter-interpretation-in-turing-documentation/54655)

<div class="topic-metadata">

**Author:** [@zenkavi](https://discourse.julialang.org/u/zenkavi)\
**Replies:** 10\
**Last updated:** [May 14, 2021, 3:36am UTC](https://discourse.julialang.org/t/confusion-about-parameter-interpretation-in-turing-documentation/54655 "2021-05-14T03:36:16Z")

</div>

In the Inference of a SDE section og the Turing tutorials the noise added to the states are described in the noise model with the \\phi parameters. Is \\sigma supposed to capture observation noise? What is its true value?

---

## [Symbolics: How to distinguish unknown type from no method?](https://discourse.julialang.org/t/symbolics-how-to-distinguish-unknown-type-from-no-method/61118)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [May 14, 2021, 2:10am UTC](https://discourse.julialang.org/t/symbolics-how-to-distinguish-unknown-type-from-no-method/61118 "2021-05-14T02:10:03Z")

</div>

Symbolics.jl sometimes tells me the types of objects. julia\> Symbolics.Term(sqrt, 2) |\> typeof SymbolicUtils.Term{Real,Nothing} Sometimes it doesn’t know the type of the result. julia\> Symbolics.Term(x-\>x+1, \[2\]) |\> t…

---

## [Package installation error (internally developed package)](https://discourse.julialang.org/t/package-installation-error-internally-developed-package/61111)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 4\
**Last updated:** [May 14, 2021, 1:54am UTC](https://discourse.julialang.org/t/package-installation-error-internally-developed-package/61111 "2021-05-14T01:54:28Z")

</div>

I am developing a package in homedir()\\.julia\\dev\\Foo01 and trying to use it. When I try to use the package the system seems to recognize the package but will not install it with the following error: julia\> using Foo01…

---

## [How to create an SVector of SVectors part II](https://discourse.julialang.org/t/how-to-create-an-svector-of-svectors-part-ii/61109)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 7\
**Last updated:** [May 14, 2021, 12:15am UTC](https://discourse.julialang.org/t/how-to-create-an-svector-of-svectors-part-ii/61109 "2021-05-14T00:15:12Z")

</div>

I have the following code: using BenchmarkTools, StaticArrays if ! @isdefined SEGMENTS const SEGMENTS = 6 end # Type definitions const SimFloat = Float64 const Vec3 = MVector{3, SimFloat} function create\_sta…

---

## [An Introduction to Julia for Quantitative Ecologists](https://discourse.julialang.org/t/an-introduction-to-julia-for-quantitative-ecologists/61112)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 0\
**Last updated:** [May 13, 2021, 11:04pm UTC](https://discourse.julialang.org/t/an-introduction-to-julia-for-quantitative-ecologists/61112 "2021-05-13T23:04:56Z")

</div>

Hi all–sharing a video of a talk I gave last week to the University of Washington’s School of Aquatic and Fishery Sciences. My goal was to introduce Julia to an audience of statistically savvy fishery and wildlife biolo…

---

## [PlotlyJS does not display plot and errors on \`Pkg.test("PlotlyJS")\`](https://discourse.julialang.org/t/plotlyjs-does-not-display-plot-and-errors-on-pkg-test-plotlyjs/57684)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 5\
**Last updated:** [May 13, 2021, 10:24pm UTC](https://discourse.julialang.org/t/plotlyjs-does-not-display-plot-and-errors-on-pkg-test-plotlyjs/57684 "2021-05-13T22:24:55Z")

</div>

This is the first time I use the package PlotlyJS. test PlotlyJS opens an empty window and outputs errors. This is using Julia 1.5.4 on Windows 10. (@v1.5) pkg\> test PlotlyJS Testing PlotlyJS Status \`C:\\Users\\miche…

---

## [Integral of quantum wavefunction](https://discourse.julialang.org/t/integral-of-quantum-wavefunction/61104)

<div class="topic-metadata">

**Author:** [@Rasoul\_Jafarzadeh](https://discourse.julialang.org/u/Rasoul_Jafarzadeh)\
**Replies:** 1\
**Last updated:** [May 13, 2021, 9:54pm UTC](https://discourse.julialang.org/t/integral-of-quantum-wavefunction/61104 "2021-05-13T21:54:01Z")

</div>

Hi. Using QuantumOptics package my code is in this form using QuantumOptics b\_c = FockBasis(10); #Fockbasis (cavity field) b\_a = SpinBasis(1//2); #2-level basis (atom) a = destroy(bc) ⊗ one(ba); σ⁻ = one(bc) ⊗ sigma…

---

## [I might have missed this but why is \`head(df::AbstractDataFrame)\` deprecated?](https://discourse.julialang.org/t/i-might-have-missed-this-but-why-is-head-df-abstractdataframe-deprecated/27988)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 52\
**Last updated:** [May 13, 2021, 9:08pm UTC](https://discourse.julialang.org/t/i-might-have-missed-this-but-why-is-head-df-abstractdataframe-deprecated/27988 "2021-05-13T21:08:32Z")

</div>

head seems to be terminology used everywhere including R and Pandas, so why deprecate it?

---

## [Julia packages for Multiscale Modelling of Multicellular Tissues?](https://discourse.julialang.org/t/julia-packages-for-multiscale-modelling-of-multicellular-tissues/61067)

<div class="topic-metadata">

**Author:** [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Replies:** 4\
**Last updated:** [May 13, 2021, 8:31pm UTC](https://discourse.julialang.org/t/julia-packages-for-multiscale-modelling-of-multicellular-tissues/61067 "2021-05-13T20:31:13Z")

</div>

I’m using Julia to program multicellular simulations. It’s working well and the simulations are very fast, but basically I was never able to use other packages in the core of my simulations. I read this preprint: whi…

---

## [foo.bar.\<TAB\> Completion Not Working](https://discourse.julialang.org/t/foo-bar-tab-completion-not-working/61052)

<div class="topic-metadata">

**Author:** [@rayegun](https://discourse.julialang.org/u/rayegun)\
**Replies:** 2\
**Last updated:** [May 13, 2021, 7:15pm UTC](https://discourse.julialang.org/t/foo-bar-tab-completion-not-working/61052 "2021-05-13T19:15:17Z")

</div>

I’ve got a type struct Configuration p::Ptr{configuration\_t} key::id\_t end which wraps a nested configuration type from C. I can look up the subkeys of this type with keys(c::Configuration) , and I allow tab c…

---

## [How to preserve default struct help entry while adding something else?](https://discourse.julialang.org/t/how-to-preserve-default-struct-help-entry-while-adding-something-else/61099)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 3\
**Last updated:** [May 13, 2021, 6:36pm UTC](https://discourse.julialang.org/t/how-to-preserve-default-struct-help-entry-while-adding-something-else/61099 "2021-05-13T18:36:24Z")

</div>

If I define a struct without any documentation entry above, I get a nice overview of the fields when searching for help about it, like this: julia\> struct A x::Float64 i::Int end help?\> A searc…

---

## [Surprising dot broadcast result when indices are repeated?](https://discourse.julialang.org/t/surprising-dot-broadcast-result-when-indices-are-repeated/61062)

<div class="topic-metadata">

**Author:** [@hsgg](https://discourse.julialang.org/u/hsgg)\
**Replies:** 9\
**Last updated:** [May 13, 2021, 6:40pm UTC](https://discourse.julialang.org/t/surprising-dot-broadcast-result-when-indices-are-repeated/61062 "2021-05-13T18:40:02Z")

</div>

I am confused about the following code. I have an indexing array pixmap to select which elements to add to: julia\> n = 10 julia\> pixmap = fill(1, n) julia\> v = fill(0, n) julia\> @. v\[pixmap\] += 1 julia\> v 10-element Vec…

---

## [Converting a toy example to DifferentialEquations](https://discourse.julialang.org/t/converting-a-toy-example-to-differentialequations/61070)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 16\
**Last updated:** [May 13, 2021, 5:16pm UTC](https://discourse.julialang.org/t/converting-a-toy-example-to-differentialequations/61070 "2021-05-13T17:16:23Z")

</div>

I am trying to convert the following Python example to Julia: """ Tutorial example showing how to use the implicit solver RADAU. It simulates a falling mass. """ import numpy as np import pylab as plt from assimulo.pro…

---

## [Solving linear system with summed DiffEqOperators](https://discourse.julialang.org/t/solving-linear-system-with-summed-diffeqoperators/60998)

<div class="topic-metadata">

**Author:** [@bclyons12](https://discourse.julialang.org/u/bclyons12)\
**Replies:** 7\
**Last updated:** [May 13, 2021, 4:20pm UTC](https://discourse.julialang.org/t/solving-linear-system-with-summed-diffeqoperators/60998 "2021-05-13T16:20:23Z")

</div>

I’m trying to solve an elliptic differential equation that has multiple derivative terms and wanted to use DiffEqOperators.jl to build the matrices. Is it possible to sum DiffEqOperators and then solve using backslash? W…

---

## [Metaprogramming: Splatting of key word arguments](https://discourse.julialang.org/t/metaprogramming-splatting-of-key-word-arguments/61092)

<div class="topic-metadata">

**Author:** [@jt1](https://discourse.julialang.org/u/jt1)\
**Replies:** 1\
**Last updated:** [May 13, 2021, 3:56pm UTC](https://discourse.julialang.org/t/metaprogramming-splatting-of-key-word-arguments/61092 "2021-05-13T15:56:33Z")

</div>

In the docs there is this example of metaprogramming: julia\> args = \[:x, :y, :z\]; julia\> :(f(1, $(args...))) :(f(1, x, y, z)) Now i would like to do the same for keyword arguments: julia\> kwargs = \[:(x=nothing), :(y=…

---

## [Can not add ModelingToolkit.jl to a new package](https://discourse.julialang.org/t/can-not-add-modelingtoolkit-jl-to-a-new-package/61090)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 1\
**Last updated:** [May 13, 2021, 3:21pm UTC](https://discourse.julialang.org/t/can-not-add-modelingtoolkit-jl-to-a-new-package/61090 "2021-05-13T15:21:09Z")

</div>

Running the following file produces an exception: module Foo import ModellingToolkit import Symbolics function foo() println("hello!") end end Foo.foo() ERROR: LoadError: ArgumentError: Package ModellingToolkit…

---

## [Makie - How to choose alignment of an axis that does not fill its allocated layout](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725)

<div class="topic-metadata">

**Author:** [@Kolaru](https://discourse.julialang.org/u/Kolaru)\
**Replies:** 3\
**Last updated:** [May 13, 2021, 3:08pm UTC](https://discourse.julialang.org/t/makie-how-to-choose-alignment-of-an-axis-that-does-not-fill-its-allocated-layout/60725 "2021-05-13T15:08:54Z")

</div>

When choosing DataAspect for an axis and setting the limits manually, it is not uncommon for an axis to not fill all the space at its disposition. As far as I know this is unavoidable since in this case the aspect ratio …

---

## [Improving performance of Integral equations (3-Nested loops)](https://discourse.julialang.org/t/improving-performance-of-integral-equations-3-nested-loops/61072)

<div class="topic-metadata">

**Author:** [@Debasish](https://discourse.julialang.org/u/Debasish)\
**Replies:** 4\
**Last updated:** [May 13, 2021, 3:07pm UTC](https://discourse.julialang.org/t/improving-performance-of-integral-equations-3-nested-loops/61072 "2021-05-13T15:07:51Z")

</div>

Dear Julia experts, This is my first ever code in Julia. Why I am switching to Julia? I have used Fortran and Matlab before to write boundary element codes previously. Here is an example https://www.youtube.com/watc…

---

## [Makie - Inset axes and their drawing order](https://discourse.julialang.org/t/makie-inset-axes-and-their-drawing-order/60987)

<div class="topic-metadata">

**Author:** [@Kolaru](https://discourse.julialang.org/u/Kolaru)\
**Replies:** 5\
**Last updated:** [May 13, 2021, 2:42pm UTC](https://discourse.julialang.org/t/makie-inset-axes-and-their-drawing-order/60987 "2021-05-13T14:42:47Z")

</div>

If I understand correctly inset axes can be create rather easily in Makie by putting multiple axes in the same layout position. Something as follow: fig = Figure(resolution=(500, 500)) # The main axis density\_ax = Axis…

---

## [Problems using MarketData.jl](https://discourse.julialang.org/t/problems-using-marketdata-jl/61082)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 3\
**Last updated:** [May 13, 2021, 2:37pm UTC](https://discourse.julialang.org/t/problems-using-marketdata-jl/61082 "2021-05-13T14:37:35Z")

</div>

I am trying to retrieve data from Yahoo! using the MarketData package. After adding the package and using it, I try the following and get errors: What am I doing wrong?

---

## [Cannot install Images because of unresolved dependancies](https://discourse.julialang.org/t/cannot-install-images-because-of-unresolved-dependancies/35235)

<div class="topic-metadata">

**Author:** [@wizebt](https://discourse.julialang.org/u/wizebt)\
**Replies:** 4\
**Last updated:** [May 13, 2021, 1:42pm UTC](https://discourse.julialang.org/t/cannot-install-images-because-of-unresolved-dependancies/35235 "2021-05-13T13:42:57Z")

</div>

Hi, While reverting from 1.4.0rc1 back to 1.3.0 I deleted the whole .julia dir and reinstalled 1.3.0. Now I cannot install Imges package … What’s appening with Artifacts.toml ^\[\[D Resolving package versions... ERROR: U…

[Previous page](https://discourse.julialang.org/latest.md?page=1391)

[Next page](https://discourse.julialang.org/latest.md?page=1393)
