# Do Bool values separated by semi-colon and comma different from each other?

**URL:** <https://discourse.julialang.org/t/do-bool-values-separated-by-semi-colon-and-comma-different-from-each-other/69864>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 16, 2021, 12:00am UTC](https://discourse.julialang.org/t/do-bool-values-separated-by-semi-colon-and-comma-different-from-each-other/69864 "2021-10-16T00:00:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 16, 2021, 12:00am UTC](https://discourse.julialang.org/t/do-bool-values-separated-by-semi-colon-and-comma-different-from-each-other/69864/1 "2021-10-16T00:00:42Z")

</div>

I have a matrix `T0` (size: 1334269 x 35). It was created by this:  
`T0 = hcat(A, B, C, D, E, ...); # A, B, C, D, E, .. are all single-column data.`

My goal is to only get the rows meeting these requirements:

```julia
Ind = map(A, B, C, D) do a, b, c, d
    (a > -20) && (b >= 15) && (c >= 500) && (d >= 500);
end

```

Ind (size: 1334269 x 1) is like this when printed out:  
`Bool[0; 0; 0; 0; 0; 0; ...]`

Here is the script to only get the rows meeting the requirements:  
`T1 = T0[Ind, :];`

Now I have a big problem. Why is my T1 a one-column data of weird values?  
T1 size: 431903 x 1.

I did a test using some other data. It seems that normally a `Bool[0, 0, 0, 0, 0, 0, ...]` is separated by comma instead of semi-colon. Could this be the problem? What is the best fix?

Many thanks!

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [October 16, 2021, 12:19am UTC](https://discourse.julialang.org/t/do-bool-values-separated-by-semi-colon-and-comma-different-from-each-other/69864/2 "2021-10-16T00:19:49Z")

</div>

Since you want `Ind` to only select one dimension, it needs to be a one-dimensional array. Try `T0[vec(Ind), :]` instead.

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 16, 2021, 12:23am UTC](https://discourse.julialang.org/t/do-bool-values-separated-by-semi-colon-and-comma-different-from-each-other/69864/3 "2021-10-16T00:23:06Z")

</div>

Thank you so much! It worked beautifully.

So the `Ind` I generated is not a one-dimensional array? I thought it is a column data, no? What is it then? How do I decide when to use vec?
