docstr: Matrix P* - size (g * g) - describes order in which groups move
  each row contains one element equal to 1, all others are 0
  no two columns have 1s in the same position
docstr_tok: ["Matrix","P","*","-","size","(","g","*","g",")","-","describes","order","in","which","groups","move","each","row","contains","one","element","equal","to","1",",","all","others","are","0","no","two","columns","have","1s","in","the","same","position"]
code: def test_generate_p_star(self):
      """
      Matrix P* - size (g * g) - describes order in which groups move
      each row contains one element equal to 1, all others are 0
      no two columns have 1s in the same position
      """
      for i in range(1, 100):
          output = _generate_p_star(i)
          if np.any(np.sum(output, 0) != np.ones(i)):
              raise AssertionError("Not legal P along axis 0")
          elif np.any(np.sum(output, 1) != np.ones(i)):
              raise AssertionError("Not legal P along axis 1")
  
imports: from numpy.testing import assert_equal, assert_allclose
  from pytest import raises, fixture, warns, mark
  import numpy
  import warnings
  from SALib.sample.morris.morris import sample, _check_group_membership, _check_if_num_levels_is_even, _compute_optimised_trajectories, _generate_p_star, _compute_b_star, _generate_trajectory, _generate_x_star
  from SALib.util import read_param_file, compute_groups_matrix, _define_problem_with_groups, _compute_delta
label_desc: Use image node_id 1 for calling the TestGroupSampleGeneration obj's underlying member method code with example usage: obj.test_generate_p_star() without return types