<commit_before>from funcs import funcs
import matlab2cpp as mc

Counter = "structs"

def Var(node):

    if funcs(node):
        return

    if node.parent.cls == "Assign" and node.parent[0] is node:
        node.declare.suggest = node.parent[1].type
    
    if node.declare.type != "TYPE":
        node.type = node.declare.type


def Get(node):

    if funcs(node):
        return

    if node.parent.cls == "Assign" and node.parent[0] is node:
        node.declare.suggest = node.parent[1].type

    if node.declare.type != "TYPE":
        node.type = node.declare.type
<commit_msg>Suggest dim = 1 (column-vector), when assigning b = [a.val]<commit_after>from funcs import funcs
import matlab2cpp as mc

Counter = "structs"

def Var(node):

    if funcs(node):
        return

    if node.parent.cls == "Assign" and node.parent[0] is node:
        #assign b = [a.val], a is a structs, suggest vec -> dim=1
        if node.parent[1].cls == "Matrix" and \
          node.parent[1].backend == "structs" and len(node.parent[1][0]) == 1:
            node.declare.suggest = (1, node.parent[1].mem)
        else:
            node.declare.suggest = node.parent[1].type
    
    if node.declare.type != "TYPE":
        node.type = node.declare.type


def Get(node):

    if funcs(node):
        return

    if node.parent.cls == "Assign" and node.parent[0] is node:
        node.declare.suggest = node.parent[1].type

    if node.declare.type != "TYPE":
        node.type = node.declare.type

{'fraction_non_alphanumeric': 0.1379542395693136, 'fraction_numerical': 0.01278600269179004, 'mean_word_length': 2.394977168949772, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5087936', 'n_tokens_mistral': 521, 'n_tokens_neox': 486, 'n_words': 126}