# Documentation

Filter Content By
Version
Languages

### LinExpr()

LinExpr ( arg1=0.0, arg2=None )

Linear expression constructor. Note that you should generally use overloaded operators instead of the explicit constructor to build linear expression objects.

This constructor takes multiple forms. You can initialize a linear expression using a constant (`LinExpr(2.0)`), a variable (`LinExpr(x)`), an expression (`LinExpr(2*x)`), a pair of lists containing coefficients and variables, respectively (`LinExpr([1.0, 2.0], [x, y])`), or a list of coefficient-variable tuples (`LinExpr([(1.0, x), (2.0, y), (1.0, z)])`).

Return value:

A linear expression object.

Example usage:

```  expr = LinExpr(2.0)
expr = LinExpr(2*x)
expr = LinExpr([1.0, 2.0], [x, y])
expr = LinExpr([(1.0, x), (2.0, y), (1.0, z)])
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.5047566,"math_prob":0.9923953,"size":747,"snap":"2019-43-2019-47","text_gpt3_token_len":221,"char_repetition_ratio":0.17362046,"word_repetition_ratio":0.019417476,"special_character_ratio":0.3253012,"punctuation_ratio":0.25454545,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9947249,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-16T22:46:03Z\",\"WARC-Record-ID\":\"<urn:uuid:1410a141-73a6-4b62-9d8c-e5792fce5274>\",\"Content-Length\":\"92338\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3025e9ee-5fdd-4705-98b3-28c9299bbfea>\",\"WARC-Concurrent-To\":\"<urn:uuid:2dddd4ab-3846-42f3-8346-d7fabb36c2c4>\",\"WARC-IP-Address\":\"13.249.44.21\",\"WARC-Target-URI\":\"https://www.gurobi.com/documentation/8.1/refman/py_linexpr2.html\",\"WARC-Payload-Digest\":\"sha1:GJTAYGUNTEOY3DZ6FUPDFFDWYQUK57OE\",\"WARC-Block-Digest\":\"sha1:7CFR6L5OW7JKOI6FGZ7NCDPHZMK4EG3O\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496668765.35_warc_CC-MAIN-20191116204950-20191116232950-00035.warc.gz\"}"}