import csv
import os
from copy import deepcopy

import numpy as np

DATASETS = os.path.dirname(os.path.abspath(__file__)) + "/data/"


def load_SCF_wealth_weights():
    """U.S. Survey of Consumer Finances data

    Returns
    -------
    SCF_wealth, SCF_weights: np.ndarray, np.ndarray
    """
    with open(DATASETS + "SCFwealthDataReduced.txt") as f:
        SCF_reader = csv.reader(f, delimiter="\t")
        SCF_raw = list(SCF_reader)
    SCF_wealth = np.zeros(len(SCF_raw)) + np.nan
    SCF_weights = deepcopy(SCF_wealth)
    for j in range(len(SCF_raw)):
        SCF_wealth[j] = float(SCF_raw[j][0])
        SCF_weights[j] = float(SCF_raw[j][1])
    return SCF_wealth, SCF_weights

0a70fcd29435d0ddc121c6c0ad00c1b28f87e0f9
<mask token>

<mask token>


def load_SCF_wealth_weights():
    """U.S. Survey of Consumer Finances data

    Returns
    -------
    SCF_wealth, SCF_weights: np.ndarray, np.ndarray
    """
    with open(DATASETS + 'SCFwealthDataReduced.txt') as f:
        SCF_reader = csv.reader(f, delimiter='\t')
        SCF_raw = list(SCF_reader)
    SCF_wealth = np.zeros(len(SCF_raw)) + np.nan
    SCF_weights = deepcopy(SCF_wealth)
    for j in range(len(SCF_raw)):
        SCF_wealth[j] = float(SCF_raw[j][0])
        SCF_weights[j] = float(SCF_raw[j][1])
    return SCF_wealth, SCF_weights

<mask token>
DATASETS = os.path.dirname(os.path.abspath(__file__)) + '/data/'


def load_SCF_wealth_weights():
    """U.S. Survey of Consumer Finances data

    Returns
    -------
    SCF_wealth, SCF_weights: np.ndarray, np.ndarray
    """
    with open(DATASETS + 'SCFwealthDataReduced.txt') as f:
        SCF_reader = csv.reader(f, delimiter='\t')
        SCF_raw = list(SCF_reader)
    SCF_wealth = np.zeros(len(SCF_raw)) + np.nan
    SCF_weights = deepcopy(SCF_wealth)
    for j in range(len(SCF_raw)):
        SCF_wealth[j] = float(SCF_raw[j][0])
        SCF_weights[j] = float(SCF_raw[j][1])
    return SCF_wealth, SCF_weights

import csv
import os
from copy import deepcopy
import numpy as np
DATASETS = os.path.dirname(os.path.abspath(__file__)) + '/data/'


def load_SCF_wealth_weights():
    """U.S. Survey of Consumer Finances data

    Returns
    -------
    SCF_wealth, SCF_weights: np.ndarray, np.ndarray
    """
    with open(DATASETS + 'SCFwealthDataReduced.txt') as f:
        SCF_reader = csv.reader(f, delimiter='\t')
        SCF_raw = list(SCF_reader)
    SCF_wealth = np.zeros(len(SCF_raw)) + np.nan
    SCF_weights = deepcopy(SCF_wealth)
    for j in range(len(SCF_raw)):
        SCF_wealth[j] = float(SCF_raw[j][0])
        SCF_weights[j] = float(SCF_raw[j][1])
    return SCF_wealth, SCF_weights

import csv
import os
from copy import deepcopy

import numpy as np

DATASETS = os.path.dirname(os.path.abspath(__file__)) + "/data/"


def load_SCF_wealth_weights():
    """U.S. Survey of Consumer Finances data

    Returns
    -------
    SCF_wealth, SCF_weights: np.ndarray, np.ndarray
    """
    with open(DATASETS + "SCFwealthDataReduced.txt") as f:
        SCF_reader = csv.reader(f, delimiter="\t")
        SCF_raw = list(SCF_reader)
    SCF_wealth = np.zeros(len(SCF_raw)) + np.nan
    SCF_weights = deepcopy(SCF_wealth)
    for j in range(len(SCF_raw)):
        SCF_wealth[j] = float(SCF_raw[j][0])
        SCF_weights[j] = float(SCF_raw[j][1])
    return SCF_wealth, SCF_weights
