Map list to bin numbersquantilization (if that is a word)Map efficiently over duplicates in listGenerating a list of cubefree numbersIs there an equivalent to MATLAB's linspace?Convert a list of hexadecimal numbers to decimalTaking one list Mod a second listlist of items and group of alternative itemsHow find numbers in this list of inequalities?Selecting list entries with a True False index list of similar lengthReplace element in array by checking condition in another listAttempting to fill a table with the number of elements in each bin and make a table with the elements in the bins?

Multi tool use
Multi tool use

Does the average primeness of natural numbers tend to zero?

Are white and non-white police officers equally likely to kill black suspects?

Patience, young "Padovan"

Is "plugging out" electronic devices an American expression?

Copycat chess is back

Map list to bin numbers

Is domain driven design an anti-SQL pattern?

Why is my log file so massive? 22gb. I am running log backups

Typesetting a double Over Dot on top of a symbol

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Does it makes sense to buy a new cycle to learn riding?

Finding files for which a command fails

What is it called when one voice type sings a 'solo'?

What causes the sudden spool-up sound from an F-16 when enabling afterburner?

Can I find out the caloric content of bread by dehydrating it?

Find the positive root of a 4-th degree polynomial equation

Are cabin dividers used to "hide" the flex of the airplane?

Calculate Levenshtein distance between two strings in Python

Does bootstrapped regression allow for inference?

Can I legally use front facing blue light in the UK?

Why do UK politicians seemingly ignore opinion polls on Brexit?

Re-submission of rejected manuscript without informing co-authors

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

What is the command to reset a PC without deleting any files



Map list to bin numbers


quantilization (if that is a word)Map efficiently over duplicates in listGenerating a list of cubefree numbersIs there an equivalent to MATLAB's linspace?Convert a list of hexadecimal numbers to decimalTaking one list Mod a second listlist of items and group of alternative itemsHow find numbers in this list of inequalities?Selecting list entries with a True False index list of similar lengthReplace element in array by checking condition in another listAttempting to fill a table with the number of elements in each bin and make a table with the elements in the bins?













3












$begingroup$


Does WL have the equivalent of Matlab's discretize or NumPy's digitize? I.e., a function that takes a length-N list and a list of bin edges and returns a length-N list of bin numbers, mapping each list item to its bin number?










share|improve this question











$endgroup$











  • $begingroup$
    HistogramList seems similar. This could also be done efficiently with GroupBy and some easy little Compile-d selection determiner. Or maybe hit it first with Sort then write something that only checks the next bin up. Again, can be easily Compile-d.
    $endgroup$
    – b3m2a1
    7 hours ago











  • $begingroup$
    I need it to work like a map (in terms of the order of the items in the resulting list). Of course it is possible to write something ...
    $endgroup$
    – Alan
    6 hours ago











  • $begingroup$
    Related: 140577
    $endgroup$
    – Carl Woll
    2 hours ago







  • 1




    $begingroup$
    Did you try BinCounts? I guess it is what you need.
    $endgroup$
    – Rom38
    1 hour ago










  • $begingroup$
    @Rom38 You probably meant BinLists, right?
    $endgroup$
    – Henrik Schumacher
    27 mins ago















3












$begingroup$


Does WL have the equivalent of Matlab's discretize or NumPy's digitize? I.e., a function that takes a length-N list and a list of bin edges and returns a length-N list of bin numbers, mapping each list item to its bin number?










share|improve this question











$endgroup$











  • $begingroup$
    HistogramList seems similar. This could also be done efficiently with GroupBy and some easy little Compile-d selection determiner. Or maybe hit it first with Sort then write something that only checks the next bin up. Again, can be easily Compile-d.
    $endgroup$
    – b3m2a1
    7 hours ago











  • $begingroup$
    I need it to work like a map (in terms of the order of the items in the resulting list). Of course it is possible to write something ...
    $endgroup$
    – Alan
    6 hours ago











  • $begingroup$
    Related: 140577
    $endgroup$
    – Carl Woll
    2 hours ago







  • 1




    $begingroup$
    Did you try BinCounts? I guess it is what you need.
    $endgroup$
    – Rom38
    1 hour ago










  • $begingroup$
    @Rom38 You probably meant BinLists, right?
    $endgroup$
    – Henrik Schumacher
    27 mins ago













3












3








3





$begingroup$


Does WL have the equivalent of Matlab's discretize or NumPy's digitize? I.e., a function that takes a length-N list and a list of bin edges and returns a length-N list of bin numbers, mapping each list item to its bin number?










share|improve this question











$endgroup$




Does WL have the equivalent of Matlab's discretize or NumPy's digitize? I.e., a function that takes a length-N list and a list of bin edges and returns a length-N list of bin numbers, mapping each list item to its bin number?







list-manipulation data






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 56 mins ago









user64494

3,58411122




3,58411122










asked 7 hours ago









AlanAlan

6,6431125




6,6431125











  • $begingroup$
    HistogramList seems similar. This could also be done efficiently with GroupBy and some easy little Compile-d selection determiner. Or maybe hit it first with Sort then write something that only checks the next bin up. Again, can be easily Compile-d.
    $endgroup$
    – b3m2a1
    7 hours ago











  • $begingroup$
    I need it to work like a map (in terms of the order of the items in the resulting list). Of course it is possible to write something ...
    $endgroup$
    – Alan
    6 hours ago











  • $begingroup$
    Related: 140577
    $endgroup$
    – Carl Woll
    2 hours ago







  • 1




    $begingroup$
    Did you try BinCounts? I guess it is what you need.
    $endgroup$
    – Rom38
    1 hour ago










  • $begingroup$
    @Rom38 You probably meant BinLists, right?
    $endgroup$
    – Henrik Schumacher
    27 mins ago
















  • $begingroup$
    HistogramList seems similar. This could also be done efficiently with GroupBy and some easy little Compile-d selection determiner. Or maybe hit it first with Sort then write something that only checks the next bin up. Again, can be easily Compile-d.
    $endgroup$
    – b3m2a1
    7 hours ago











  • $begingroup$
    I need it to work like a map (in terms of the order of the items in the resulting list). Of course it is possible to write something ...
    $endgroup$
    – Alan
    6 hours ago











  • $begingroup$
    Related: 140577
    $endgroup$
    – Carl Woll
    2 hours ago







  • 1




    $begingroup$
    Did you try BinCounts? I guess it is what you need.
    $endgroup$
    – Rom38
    1 hour ago










  • $begingroup$
    @Rom38 You probably meant BinLists, right?
    $endgroup$
    – Henrik Schumacher
    27 mins ago















$begingroup$
HistogramList seems similar. This could also be done efficiently with GroupBy and some easy little Compile-d selection determiner. Or maybe hit it first with Sort then write something that only checks the next bin up. Again, can be easily Compile-d.
$endgroup$
– b3m2a1
7 hours ago





$begingroup$
HistogramList seems similar. This could also be done efficiently with GroupBy and some easy little Compile-d selection determiner. Or maybe hit it first with Sort then write something that only checks the next bin up. Again, can be easily Compile-d.
$endgroup$
– b3m2a1
7 hours ago













$begingroup$
I need it to work like a map (in terms of the order of the items in the resulting list). Of course it is possible to write something ...
$endgroup$
– Alan
6 hours ago





$begingroup$
I need it to work like a map (in terms of the order of the items in the resulting list). Of course it is possible to write something ...
$endgroup$
– Alan
6 hours ago













$begingroup$
Related: 140577
$endgroup$
– Carl Woll
2 hours ago





$begingroup$
Related: 140577
$endgroup$
– Carl Woll
2 hours ago





1




1




$begingroup$
Did you try BinCounts? I guess it is what you need.
$endgroup$
– Rom38
1 hour ago




$begingroup$
Did you try BinCounts? I guess it is what you need.
$endgroup$
– Rom38
1 hour ago












$begingroup$
@Rom38 You probably meant BinLists, right?
$endgroup$
– Henrik Schumacher
27 mins ago




$begingroup$
@Rom38 You probably meant BinLists, right?
$endgroup$
– Henrik Schumacher
27 mins ago










3 Answers
3






active

oldest

votes


















5












$begingroup$

This is a very quick-n-dirty, but may serve as a simple example.



This creates a piecewise function following the first definition in Matlab's discretize documentation, then applies that to the data.



disc[data_, edges_] := Module[e = Partition[edges, 2, 1], p, l,
l = Length@e;
Table[Piecewise[
Append[Table[i, e[[i, 1]] <= x < e[[i, 2]], i, l - 1]
, l,e[[l, 1]] <= x <= e[[l, 2]]]
, "NaN"]
, x, data]];


From the first example in the above referenced documentation:



data=1, 1, 2, 3, 6, 5, 8, 10, 4, 4;
edges=2, 4, 6, 8, 10;

disc[data,edges]



NaN,NaN,1,1,3,2,4,4,2,2




I'm sure there are more efficient/elegant solutions, and will revisit as time permits.






share|improve this answer









$endgroup$




















    2












    $begingroup$

    Here's a version based on Nearest:



    digitize[edges_] := DigitizeFunction[edges, Nearest[edges -> "Index"]]
    digitize[data_, edges_] := digitize[edges][data]

    DigitizeFunction[edges_, nf_NearestFunction][data_] := With[init = nf[data][[All, 1]],
    init + UnitStep[data - edges[[init]]] - 1
    ]


    For example:



    SeedRandom[1]
    data = RandomReal[10, 10]
    digitize[data, 2, 4, 5, 7, 8]



    8.17389, 1.1142, 7.89526, 1.87803, 2.41361, 0.657388, 5.42247, 2.31155, 3.96006, 7.00474



    5, 0, 4, 0, 1, 0, 3, 1, 1, 4




    Note that I broke up the definition of digitize into two pieces, so that if you do this for multiple data sets with the same edges list, you only need to compute the nearest function once.






    share|improve this answer











    $endgroup$




















      1












      $begingroup$

      You may also use Interpolation with InterpolationOrder -> 0. However, employing Nearest as Carl Woll did will usually be much faster.



      First, we prepare the interplating function.



      m = 20;
      binboundaries = Join[-1., Sort[RandomReal[-1, 1, m - 1]], 1.];

      f = Interpolation[Transpose[binboundaries, Range[0, m]], InterpolationOrder -> 0];


      Now you can apply it to lists of values as follows:



      vals = RandomReal[-1, 1, 1000]; 
      Round[f[vals]]





      share|improve this answer









      $endgroup$













        Your Answer





        StackExchange.ifUsing("editor", function ()
        return StackExchange.using("mathjaxEditing", function ()
        StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
        StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
        );
        );
        , "mathjax-editing");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "387"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f194844%2fmap-list-to-bin-numbers%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5












        $begingroup$

        This is a very quick-n-dirty, but may serve as a simple example.



        This creates a piecewise function following the first definition in Matlab's discretize documentation, then applies that to the data.



        disc[data_, edges_] := Module[e = Partition[edges, 2, 1], p, l,
        l = Length@e;
        Table[Piecewise[
        Append[Table[i, e[[i, 1]] <= x < e[[i, 2]], i, l - 1]
        , l,e[[l, 1]] <= x <= e[[l, 2]]]
        , "NaN"]
        , x, data]];


        From the first example in the above referenced documentation:



        data=1, 1, 2, 3, 6, 5, 8, 10, 4, 4;
        edges=2, 4, 6, 8, 10;

        disc[data,edges]



        NaN,NaN,1,1,3,2,4,4,2,2




        I'm sure there are more efficient/elegant solutions, and will revisit as time permits.






        share|improve this answer









        $endgroup$

















          5












          $begingroup$

          This is a very quick-n-dirty, but may serve as a simple example.



          This creates a piecewise function following the first definition in Matlab's discretize documentation, then applies that to the data.



          disc[data_, edges_] := Module[e = Partition[edges, 2, 1], p, l,
          l = Length@e;
          Table[Piecewise[
          Append[Table[i, e[[i, 1]] <= x < e[[i, 2]], i, l - 1]
          , l,e[[l, 1]] <= x <= e[[l, 2]]]
          , "NaN"]
          , x, data]];


          From the first example in the above referenced documentation:



          data=1, 1, 2, 3, 6, 5, 8, 10, 4, 4;
          edges=2, 4, 6, 8, 10;

          disc[data,edges]



          NaN,NaN,1,1,3,2,4,4,2,2




          I'm sure there are more efficient/elegant solutions, and will revisit as time permits.






          share|improve this answer









          $endgroup$















            5












            5








            5





            $begingroup$

            This is a very quick-n-dirty, but may serve as a simple example.



            This creates a piecewise function following the first definition in Matlab's discretize documentation, then applies that to the data.



            disc[data_, edges_] := Module[e = Partition[edges, 2, 1], p, l,
            l = Length@e;
            Table[Piecewise[
            Append[Table[i, e[[i, 1]] <= x < e[[i, 2]], i, l - 1]
            , l,e[[l, 1]] <= x <= e[[l, 2]]]
            , "NaN"]
            , x, data]];


            From the first example in the above referenced documentation:



            data=1, 1, 2, 3, 6, 5, 8, 10, 4, 4;
            edges=2, 4, 6, 8, 10;

            disc[data,edges]



            NaN,NaN,1,1,3,2,4,4,2,2




            I'm sure there are more efficient/elegant solutions, and will revisit as time permits.






            share|improve this answer









            $endgroup$



            This is a very quick-n-dirty, but may serve as a simple example.



            This creates a piecewise function following the first definition in Matlab's discretize documentation, then applies that to the data.



            disc[data_, edges_] := Module[e = Partition[edges, 2, 1], p, l,
            l = Length@e;
            Table[Piecewise[
            Append[Table[i, e[[i, 1]] <= x < e[[i, 2]], i, l - 1]
            , l,e[[l, 1]] <= x <= e[[l, 2]]]
            , "NaN"]
            , x, data]];


            From the first example in the above referenced documentation:



            data=1, 1, 2, 3, 6, 5, 8, 10, 4, 4;
            edges=2, 4, 6, 8, 10;

            disc[data,edges]



            NaN,NaN,1,1,3,2,4,4,2,2




            I'm sure there are more efficient/elegant solutions, and will revisit as time permits.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 5 hours ago









            ciaociao

            17.4k138109




            17.4k138109





















                2












                $begingroup$

                Here's a version based on Nearest:



                digitize[edges_] := DigitizeFunction[edges, Nearest[edges -> "Index"]]
                digitize[data_, edges_] := digitize[edges][data]

                DigitizeFunction[edges_, nf_NearestFunction][data_] := With[init = nf[data][[All, 1]],
                init + UnitStep[data - edges[[init]]] - 1
                ]


                For example:



                SeedRandom[1]
                data = RandomReal[10, 10]
                digitize[data, 2, 4, 5, 7, 8]



                8.17389, 1.1142, 7.89526, 1.87803, 2.41361, 0.657388, 5.42247, 2.31155, 3.96006, 7.00474



                5, 0, 4, 0, 1, 0, 3, 1, 1, 4




                Note that I broke up the definition of digitize into two pieces, so that if you do this for multiple data sets with the same edges list, you only need to compute the nearest function once.






                share|improve this answer











                $endgroup$

















                  2












                  $begingroup$

                  Here's a version based on Nearest:



                  digitize[edges_] := DigitizeFunction[edges, Nearest[edges -> "Index"]]
                  digitize[data_, edges_] := digitize[edges][data]

                  DigitizeFunction[edges_, nf_NearestFunction][data_] := With[init = nf[data][[All, 1]],
                  init + UnitStep[data - edges[[init]]] - 1
                  ]


                  For example:



                  SeedRandom[1]
                  data = RandomReal[10, 10]
                  digitize[data, 2, 4, 5, 7, 8]



                  8.17389, 1.1142, 7.89526, 1.87803, 2.41361, 0.657388, 5.42247, 2.31155, 3.96006, 7.00474



                  5, 0, 4, 0, 1, 0, 3, 1, 1, 4




                  Note that I broke up the definition of digitize into two pieces, so that if you do this for multiple data sets with the same edges list, you only need to compute the nearest function once.






                  share|improve this answer











                  $endgroup$















                    2












                    2








                    2





                    $begingroup$

                    Here's a version based on Nearest:



                    digitize[edges_] := DigitizeFunction[edges, Nearest[edges -> "Index"]]
                    digitize[data_, edges_] := digitize[edges][data]

                    DigitizeFunction[edges_, nf_NearestFunction][data_] := With[init = nf[data][[All, 1]],
                    init + UnitStep[data - edges[[init]]] - 1
                    ]


                    For example:



                    SeedRandom[1]
                    data = RandomReal[10, 10]
                    digitize[data, 2, 4, 5, 7, 8]



                    8.17389, 1.1142, 7.89526, 1.87803, 2.41361, 0.657388, 5.42247, 2.31155, 3.96006, 7.00474



                    5, 0, 4, 0, 1, 0, 3, 1, 1, 4




                    Note that I broke up the definition of digitize into two pieces, so that if you do this for multiple data sets with the same edges list, you only need to compute the nearest function once.






                    share|improve this answer











                    $endgroup$



                    Here's a version based on Nearest:



                    digitize[edges_] := DigitizeFunction[edges, Nearest[edges -> "Index"]]
                    digitize[data_, edges_] := digitize[edges][data]

                    DigitizeFunction[edges_, nf_NearestFunction][data_] := With[init = nf[data][[All, 1]],
                    init + UnitStep[data - edges[[init]]] - 1
                    ]


                    For example:



                    SeedRandom[1]
                    data = RandomReal[10, 10]
                    digitize[data, 2, 4, 5, 7, 8]



                    8.17389, 1.1142, 7.89526, 1.87803, 2.41361, 0.657388, 5.42247, 2.31155, 3.96006, 7.00474



                    5, 0, 4, 0, 1, 0, 3, 1, 1, 4




                    Note that I broke up the definition of digitize into two pieces, so that if you do this for multiple data sets with the same edges list, you only need to compute the nearest function once.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 2 hours ago

























                    answered 2 hours ago









                    Carl WollCarl Woll

                    73k396189




                    73k396189





















                        1












                        $begingroup$

                        You may also use Interpolation with InterpolationOrder -> 0. However, employing Nearest as Carl Woll did will usually be much faster.



                        First, we prepare the interplating function.



                        m = 20;
                        binboundaries = Join[-1., Sort[RandomReal[-1, 1, m - 1]], 1.];

                        f = Interpolation[Transpose[binboundaries, Range[0, m]], InterpolationOrder -> 0];


                        Now you can apply it to lists of values as follows:



                        vals = RandomReal[-1, 1, 1000]; 
                        Round[f[vals]]





                        share|improve this answer









                        $endgroup$

















                          1












                          $begingroup$

                          You may also use Interpolation with InterpolationOrder -> 0. However, employing Nearest as Carl Woll did will usually be much faster.



                          First, we prepare the interplating function.



                          m = 20;
                          binboundaries = Join[-1., Sort[RandomReal[-1, 1, m - 1]], 1.];

                          f = Interpolation[Transpose[binboundaries, Range[0, m]], InterpolationOrder -> 0];


                          Now you can apply it to lists of values as follows:



                          vals = RandomReal[-1, 1, 1000]; 
                          Round[f[vals]]





                          share|improve this answer









                          $endgroup$















                            1












                            1








                            1





                            $begingroup$

                            You may also use Interpolation with InterpolationOrder -> 0. However, employing Nearest as Carl Woll did will usually be much faster.



                            First, we prepare the interplating function.



                            m = 20;
                            binboundaries = Join[-1., Sort[RandomReal[-1, 1, m - 1]], 1.];

                            f = Interpolation[Transpose[binboundaries, Range[0, m]], InterpolationOrder -> 0];


                            Now you can apply it to lists of values as follows:



                            vals = RandomReal[-1, 1, 1000]; 
                            Round[f[vals]]





                            share|improve this answer









                            $endgroup$



                            You may also use Interpolation with InterpolationOrder -> 0. However, employing Nearest as Carl Woll did will usually be much faster.



                            First, we prepare the interplating function.



                            m = 20;
                            binboundaries = Join[-1., Sort[RandomReal[-1, 1, m - 1]], 1.];

                            f = Interpolation[Transpose[binboundaries, Range[0, m]], InterpolationOrder -> 0];


                            Now you can apply it to lists of values as follows:



                            vals = RandomReal[-1, 1, 1000]; 
                            Round[f[vals]]






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 17 mins ago









                            Henrik SchumacherHenrik Schumacher

                            59.5k582166




                            59.5k582166



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Mathematica Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                Use MathJax to format equations. MathJax reference.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f194844%2fmap-list-to-bin-numbers%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                XS88dw,Z,CZxNsA,GkOKgCoupQNmA2pvIzIm3ZMdsmz,EYG9ixXKX92Ht vyc 4QVXd8t6SHTiszEbd,BuF,vKPg yh76pU E6KbnXsU
                                o,1ixR7TE8 i,dgEYzP76fx6d3W 48mm7NMWc k4KyryRo4ErmLrSbc,aR9,cgoNwY k6F8MR m,tH,ew5Q 771qCqeYC2wwmR2naH

                                Popular posts from this blog

                                What is the result of assigning to std::vector::begin()? The Next CEO of Stack OverflowWhat are the differences between a pointer variable and a reference variable in C++?What does the explicit keyword mean?Concatenating two std::vectorsHow to find out if an item is present in a std::vector?Why is “using namespace std” considered bad practice?What is the “-->” operator in C++?What is the easiest way to initialize a std::vector with hardcoded elements?What is The Rule of Three?What are the basic rules and idioms for operator overloading?Why are std::begin and std::end “not memory safe”?

                                Creating centerline of river in QGIS? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Finding centrelines from polygons in QGIS?Splitting line into two lines with GRASS GIS?Centroid of the equator and a pointpostgis: problems creating flow direction polyline; not all needed connections are drawnhow to make decent sense from scattered river depth measurementsQGIS Interpolation on Curved Grid (River DEMs)How to create automatic parking baysShortest path creation between two linesclipping layer using query builder in QGISFinding which side of closest polyline point lies on in QGIS?Create centerline from multi-digitized roadway lines Qgis 2.18Getting bathymetric contours confined only within river banks using QGIS?

                                SQL Server 2016 - excessive memory grant warning on poor performing query The Next CEO of Stack OverflowFix for slow SQL_INLINE_TABLE_VALUED_FUNCTIONLarge memory grant requestsPoor performing Query -Tsql execution plan - estimated number of rows =1 Paste the PlanMSSQL - Query had to wait for memory grantRow estimates always too lowBad performance using “NOT IN”Warning about memory “Excessive Grant” in the query plan - how to find out what is causing it?Optimizing table valued function SQL ServerWhen does SQL Server warn about an Excessive Memory Grant?Warning in Execution Plan