def test_view_of_view_modification():
    adata = ad.AnnData(np.zeros((10, 10)))
    adata[0, :][:, 5:].X = np.ones(5)
    assert np.all(adata.X[0, 5:] == np.ones(5))
    adata[[1, 2], :][:, [1, 2]].X = np.ones((2, 2))
    assert np.all(adata.X[1:3, 1:3] == np.ones((2, 2)))

    adata.X = sparse.csr_matrix(adata.X)
    adata[0, :][:, 5:].X = np.ones(5) * 2
    assert np.all(asarray(adata.X)[0, 5:] == np.ones(5) * 2)
    adata[[1, 2], :][:, [1, 2]].X = np.ones((2, 2)) * 2
    assert np.all(asarray(adata.X)[1:3, 1:3] == np.ones((2, 2)) * 2)
def __init__(self, host, key, port=443, max_size=4096):

        # Params for all class
        self.host = host
        self.port = port
        self.max_size = max_size - 60
        self.AESDriver = AESCipher(key=key)
        self.serv_addr = (host, port)

        # Class Globals
        self.max_packets = 255 # Limitation by QUIC itself.
        self._genSeq()   # QUIC Sequence is used to know that this is the same sequence,
                          # and it's a 20 byte long that is kept the same through out the
                          # session and is transfered hex encoded.
        self.delay = 0.1

        self.sock = None
        if self._createSocket() is 1:               # Creating a UDP socket object
            sys.exit(1)
        self.serv_addr = (self.host, self.port)     # Creating socket addr format